You need to sign in to do that
Don't have an account?
College Management
JSON Html reponse while integrating salesforce to quickbook.
Hi, I am trying to integrate salesforce to quickbook , while executing the class i am getting STATUS : OK STATUS_CODE : 200 , Expected JSON response but i am getting html as a response.
HttpRequest req = new HttpRequest();
req.setMethod('POST');
req.setEndpoint(loginUri);
req.setBody("Here i am passing some arguments");
req.setHeader('Accept', 'application/json;charset=UTF-8');
Http http = new Http();
HTTPResponse res = http.send(req);
System.debug('RESPONSEEEEEEEEEEEEEEEEEEe'+res.getBody());
Thanks !
HttpRequest req = new HttpRequest();
req.setMethod('POST');
req.setEndpoint(loginUri);
req.setBody("Here i am passing some arguments");
req.setHeader('Accept', 'application/json;charset=UTF-8');
Http http = new Http();
HTTPResponse res = http.send(req);
System.debug('RESPONSEEEEEEEEEEEEEEEEEEe'+res.getBody());
Thanks !
The HTML response is likely an error condition due to the web service not being called correctly.
If you use Chrome, try downloading the "REST Console" plugin and issuing the same request with the plugin. At the very least, you'll know it's some issue with calling the webservice, and then you can easily tweak your request to fix it.
Furthermore, I'd try getting ahold of the web service developer or looking closely through any documentation for troubleshooting tips.
Good luck.
Thanks !