Retrofit Post Parameter

前端 未结 6 973
无人共我
无人共我 2020-12-08 06:37

I am implementing login feature and for that using Post request but i am getting error saying

\"retrofit.RetrofitError: com.squareup.okhttp.interna

6条回答
  •  -上瘾入骨i
    2020-12-08 07:05

    You can use the class like this:

    public interface SafeUserApi {
        @POST("/api/userlogin")
        void getUserLogin(@Body PostData postData);
    }
    
    public class PostData{
          String client_id;
          String client_secret;
          String username;
          String password;
    }
    

提交回复
热议问题