cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to make a REST api call from node.js service, even though the content type i provide is jSON, i am getting the response in an HTML format i.e. it gives entire html page of the composer as a response ,can you help me to get a json response

Highlighted
Newbie

I am trying to make a REST api call from node.js service, even though the content type i provide is jSON, i am getting the response in an HTML format i.e. it gives entire html page of the composer as a response ,can you help me to get a json response

I am trying to make a REST api call from node.js service, even though the content type i provide is jSON, i am getting the response in an HTML format i.e. it gives entire html page of the composer as a response ,can you help me to get a json response.  i have attached a screen shot of the response im getting.

4 REPLIES 4

Re: I am trying to make a REST api call from node.js service, even though the content type i provide is jSON, i am getting the response in an HTML format i.e. it gives entire html page of the composer as a response ,can you help me to get a json response

can you show how your Headers look like in POSTMAN ? from the looks of it your Accept parameter may be incorrect...

Re: I am trying to make a REST api call from node.js service, even though the content type i provide is jSON, i am getting the response in an HTML format i.e. it gives entire html page of the composer as a response ,can you help me to get a json response

Yes i have attached the screenshot of the headers used in POSTMANScreen Shot 2018-01-29 at 12.24.33 PM.png

Re: I am trying to make a REST api call from node.js service, even though the content type i provide is jSON, i am getting the response in an HTML format i.e. it gives entire html page of the composer as a response ,can you help me to get a json response

add 'Accept' header with value as application/json and you should get the json format back... thanks

Re: I am trying to make a REST api call from node.js service, even though the content type i provide is jSON, i am getting the response in an HTML format i.e. it gives entire html page of the composer as a response ,can you help me to get a json response

Yes thanks for the help got it .