Created
January 26, 2016 02:24
-
-
Save leeyc09/dbe7f47675d6e80fea91 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface sample_Interface { | |
//URL encoding하여 보냅니다. | |
//POST 방식, 파라메터는 @Field("파라메터명") 으로 보낼 수 있습니다. | |
//Json형식에 맞게 Bean객체를 만들어 두면 설정항 Parser가 자동으로 컨버팅해 돌려 줍니다. | |
@FormUrlEncoded | |
@POST("auth") | |
Call<AuthModel> Auth(@Field("email") String email, @Field("password") String password); | |
// Get방식, 파라메터는 @Query("파라메터명")으로 보낼 수 있습니다. | |
// Bean객체를 생성하지 않고 JsonObject로 받을 수 있습니다. | |
@GET("project") | |
Call<JsonObject> Project(@Query("email") String email); | |
// Get방식, 주소가 고정되지 않는 상황에서는 @Path를 통해 주소를 다이나믹하게 넣을 수 있습니다. | |
@GET("project/{project_id}/image") | |
Call<JsonObject> ProjectImagesList(@Path("project_id") String project_id); | |
//Rxandroid 사용 | |
@GET("project") | |
Observable<JsonObject> Project(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment