I have two methods to call an API.
1.POST
2.PUT
Currently, i keep the two versions like
@POST("api_end_point")
Call<ProfessionalResponse> ProfessionalData(
@Header("Authorization") String authorization,
@Body ProfessionalInsertData body);
@PUT("api_end_point")
Call<ProfessionalResponse> ProfessionalData(
@Header("Authorization") String authorization,
@Body ProfessionalInsertData body);
How can I reduce this to a single function or single call in java or kotlin