I am sending a POST request to server and my interface is this for Retrofit2 to convert it into JSON
public interface LoginService {
@POST("auth/signin")
@FormUrlEncoded
Call<CurrentUser> signin(
@Field("email") String email,
@Field("password") String password,
@Field("device_os") String device_os,
@Field("device_identity") String device_id
);
}
I want to see this request body in JSON format for the purpose of debugging.
Please help ! Thanks in advance .
check this answer
You can use a logging interceptor for it.