In my application i need to consume a API which need to call with 2 different type of request.
if user adding employee i need to call with POST, while updating user i need to call with PUT.
For now i am able to construct request with dynamic URL, headers, request, but along with this i should be able to supply request type also.
@PUT
fun addorUpdateEmp(
@Url url: String?, @HeaderMap headers: Map<String, String>?, @Body data: EmployeeModel.Request
): Call<EmployeeModel.Response>
Here i don't want to hard code "PUT" type, instead i want to supply that as parameter