How to post HTTPS request using Retrofit?

后端 未结 2 1763
温柔的废话
温柔的废话 2020-12-28 21:24

I build a restAdapter by this:

    return new RestAdapter.Builder()
            .setEndpoint(\"https://www.xyz.com/\")
            .build()
            .crea         


        
2条回答
  •  鱼传尺愫
    2020-12-28 21:28

    public interface SafeUserApi {
        @FormUrlEncoded
        @POST("/api/userlogin")
        void getUserLogin(@Field("parm1")UserserLogin userLogin, Callback cb);
    }
    

    Here parm1 is the POST parameter that you will be passing it to the server. This will solve your problem

提交回复
热议问题