HTTP GET with request body RETROFIT

前端 未结 5 1970
轻奢々
轻奢々 2021-02-06 23:45

I am using Retrofit to make api calls in my android application. I have to submit a @Body of JSON

@GET(\"api/\")
void getData(@Body UserPostRequestBody request)
         


        
5条回答
  •  既然无缘
    2021-02-06 23:58

    To Send body in a GET request use:

    @HTTP(method = "GET", path = "api/users", hasBody = true)
    Observable jobDelete(@Body UserPostRequestBody body);
    

    as is described in this post

提交回复
热议问题