cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Client response formatted different from REST Get

maahutch
New Contributor

I'm trying to replace the REST Get snaps in my pipelines with the Http Client snap but the response I'm getting is formatted differently. With the Rest Get snap, the JSON response is formatted as a list so I can subset it using $entity.data notation: 

maahutch_1-1741703308989.png

However, when I use the HTTP Client snap, the 'entity' element is returned as a string: 

maahutch_2-1741703411450.png

As close as possible, I tried to configure both snaps the same but I'm assuming there's something different about the HTTP Client snap that I need to change. Can someone explain what I need to do to get the HTTP Client to return the JSON in the same format at the Rest Get snap?

 

 

6 REPLIES 6

Yes, the response type is set to JSON. I also tried using the Extract Entity as Document option but it just returned the string by itself:

maahutch_0-1741710722382.png

 

maahutch_1-1741710816560.png

 

 

 

ssapa
Employee
Employee

@maahutch The issue seems to be related to content-type. The HttpClient supports application/json contentType, but here the content-type= application/vnd.api+json, which is not considered as application/json by HttpClient snap. Where as Rest snap is still considering this as json content type and formatting the response. There is already an open bug related to this for HttpClient, and it will be fixed soon.