c# - using Rest client and getting statuscode 406 not acceptable -
i'm using restclient , redirecting request external rest webservice (java) restrequest. i'm getting http statuscode 'not acceptable' , repsonse.content "the resource cannot displayed because file extension not beingness accepted browser." operation successful not able required response nil string value.
below code snippet:
var client = new restclient(); client.baseurl = javawsuri; var request = new restrequest(); //request.addheader("content-length", int.maxvalue.tostring()); //request.addheader("content-type", "text/html; charset=utf-8"); // jsond json input object request.addparameter("application/json", jsond, parametertype.requestbody); request.method = method.post; request.requestformat = dataformat.json; // server's rest method homecoming var response = client.execute(request) restresponse;
from error message, sounds may need add together 'accept' header request
c# rest rest-client
No comments:
Post a Comment