Skip to content

Instantly share code, notes, and snippets.

@vjacheslavl
Created November 1, 2017 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vjacheslavl/01eea424ec8fe97e7352ed199a50c1a1 to your computer and use it in GitHub Desktop.
Save vjacheslavl/01eea424ec8fe97e7352ed199a50c1a1 to your computer and use it in GitHub Desktop.
package com.example.at.support.rest;
import com.example.at.support.rest.dto.SingleUserResponse;
import com.example.at.support.rest.dto.UserListResponse;
import com.example.at.support.rest.dto.UserPayload;
import feign.Headers;
import feign.Param;
import feign.RequestLine;
public interface ApplicationEndpoints {
@Headers({"Accepts: application/json, text/plain, */*"})
@RequestLine("GET /prod")
UserListResponse getAllUsers();
@RequestLine("GET /prod/{id}")
SingleUserResponse getUseById(@Param("id") String id);
@RequestLine("DELETE /prod")
void deleteById(UserPayload dto);
@RequestLine("POST /prod")
@Headers("Content-Type: application/json")
void createUser(UserPayload dto);
@RequestLine("PUT /prod")
@Headers("Content-Type: application/json")
void modifyUser(UserPayload dto);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment