В Retrofit используйте API, как показано ниже:
Метод GET (с параметрами):
@GET("doctor_review.php")
Call<DoctorReview> getreview(@Query("doctor_id") String Id);
Метод POST (с параметрами):
@FormUrlEncoded
@POST("update_doctor_status.php")
Call<UpdateDoctorStatus> updateDoctorStatus(@Field("user_id") String doctor_id, @Field("status") String status, @Field("type") String type);
Метод POSTс объектом json в качестве тела:
@POST("SocialLogin")
Call<LoginResponse> socialLogin(@Body JsonObject body);
// take below object as reference that will be passed in above post api as body
JsonObject jsonObjectLogin = new JsonObject();
jsonObjectLogin.addProperty("email", profileEmail);
jsonObjectLogin.addProperty("password", password);
jsonObjectLogin.addProperty("deviceToken", refreshedToken);
jsonObjectLogin.addProperty("Timezone", Utility.getTimeZone());