android - Volley post request 415 error -


api response post request using volley gives me 415 error - there problem requests content-type: expected 'application/json'.

the issue not api because if not use volley or use browser rest client proper response.

this code used

 volleyrequestmanager<test> volleyrequestmanager =             new volleyrequestmanager<>(request.method.post, url,    requestbody, test.class,                     utility.getbearerauthheader(context.getapplicationcontext(),                             constants.requestkey.content_type_application_json), listener, errorlistener             );      volleyrequestqueue.getinstance(context.getapplicationcontext())             .addtorequestqueue(volleyrequestmanager, tag); 

for request body params,jsonobject created , add values , converts string

  jsonobject params = new jsonobject();     params.tostring() 

please help.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -