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
For JSONobjectRequest the getParams() doesn’t work for POST requests so you have to make a customRequest and override getParams() method over there. Its because JsonObjectRequest is extended JsonRequest which overrides getBody() method directly, so your getParam() would never invoke. To invoke your getParams() method you first have to override getBody(). Or for a simple solution you can use StringRequest.