不支持@DELETE方法(非正文 HTTP 方法不能包含@Body或@TypedOutput。
@DELETE("/job/deletejob")
Observable<JobDeleteResponseModel> jobDelete( @Body JobDeleteRequestModel model);
我收到此错误:
非正文 HTTP 方法不能包含@Body或@TypedOutput
@DELETE("/job/deletejob")
Observable<JobDeleteResponseModel> jobDelete( @Body JobDeleteRequestModel model);
我收到此错误:
非正文 HTTP 方法不能包含@Body或@TypedOutput
我最近使用了这个官方解决方法:
@HTTP(method = "DELETE", path = "/job/deletejob", hasBody = true)
Observable<JobDeleteResponseModel> jobDelete(@Body JobDeleteRequestModel model);
您需要指定参数
方法,路径,具有Body
Kotlin方式
@HTTP(method = "DELETE", path = "event/eventRemovePicture", hasBody = true)
fun callDeleteImage(
@Body body: RequestBody
): Call<RemoveEventPictureResponse>