How to perform a DELETE request without return type or Callback? [Retrofit]

后端 未结 4 1602
长发绾君心
长发绾君心 2021-02-20 11:07

I need perform a DELETE request using Retrofit. So, my code snippet of the interface looks like this:

@DELETE(\"/api/item/{id}\")
void deleteItem(@Path(\"id\") i         


        
4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-20 11:35

    @FormUrlEncoded
    @HTTP(method = "DELETE", path = "manage-feed", hasBody = true)
    Call deletePost(@Field("post_id") Integer postId, @Field("share_id") Integer sharedMapId);
    

提交回复
热议问题