API响应如下:
true
我尝试过以下方式:
@GET("url")
Call<Boolean> checkUser(@Body String emailId);
但是它显示了一个错误,如“非body HTTP方法不能包含@Body”
正如错误本身所提示的那样,您在API调用中没有传递键参数。
请尝试使用Query("parameter_name")
而不是Body
就像下面这样
@GET("employees/details")
Call<Boolean> checkUser(@Query("emailId") String emailId);
试试这个
@GET("your_api_endPoint")
Call<Boolean> checkUser(@Path("parameterKey") String email);