@DELETE("/job/deletejob")
Observable<JobDeleteResponseModel> jobDelete( @Body JobDeleteRequestModel model);
am getting this error:
Non-body HTTP method cannot contain @Body or @TypedOutput
I've used this official workaround recently:
@HTTP(method = "DELETE", path = "/job/deletejob", hasBody = true)
Observable<JobDeleteResponseModel> jobDelete(@Body JobDeleteRequestModel model);
@HTTP(method = "DELETE", path = "api/v3/delete", hasBody = true)
Call<ResponseBody> RESPONSE_BODY_CALL(@Header("Authorization") String authorization, @Body HashMap<String, List> stringListHashMap);
or check https://github.com/square/retrofit/issues/974
You need to specify parameters
method, path, hasBody
Kotlin way
@HTTP(method = "DELETE", path = "event/eventRemovePicture", hasBody = true)
fun callDeleteImage(
@Body body: RequestBody
): Call<RemoveEventPictureResponse>
I had similar error.
In my case I was using @GET
in Interface but then I corrected it to @POST
method and it worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With