GET

Let's assume that you want to get a response to your details from your GitHub account. You need to use the following endpoint with the @GET function to get the user's info:

@GET("group/{id}/users")
Call<List<Users>> groupList(@Path("id") int id);

Let's assume that you want to create a new repo in your GitHub account. Here, you need to use the following endpoint with the @POST function:

@POST("user/repos")
fun createRepo(@Body repo:Repository,
@Header("Authorization") accessToken: String,
@Header("Accept") apiVersionSpec: String,
@Header("Content-Type") contentType: String): Call<Repository>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.186.219