Volley not calling getParams() for standard POST request

后端 未结 11 947
执念已碎
执念已碎 2020-11-30 07:56

I am trying to post some parameters to my rails API using Volley in Android. This is the code:

I tried with two log statements, one in getParams() and

11条回答
  •  我在风中等你
    2020-11-30 08:43

    The third parameter should be a JSONObject you do not need the getParams() method just pass them into the request.

     JsonObjectRequest jsonObjReq = new JsonObjectRequest(
                method,
                url,
                jsonObjParams,    // <<< HERE
                responseListener,
                errorListener);
    

提交回复
热议问题