121
Views
5
Comments
Solved
consume web service response's header
Question

Hi there,

i consume external web service using REST API. My question is how to read the response's header of the web service?

regards, thank you

mvp_badge
MVP
Rank: #2
Solution

Hi Pasar,

Note that if you just want values from the header, it may not be needed to use the On After Response, but instead you an add the header parameters as Output Parameters with their "Receive In" Property set to "Header". If you match their names to the header name, or set the ""Name in Response" to the right value, you receive them without having to use the On After Response.

mvp_badge
MVP
Rank: #6
mvp_badge
MVP
Rank: #2
Solution

Hi Pasar,

Note that if you just want values from the header, it may not be needed to use the On After Response, but instead you an add the header parameters as Output Parameters with their "Receive In" Property set to "Header". If you match their names to the header name, or set the ""Name in Response" to the right value, you receive them without having to use the On After Response.

Rank: #348

Hi Edu and Kil,

Thank you very much. The Kilian's way is working:

, and for Edu, it is the way to customized response received, although i am still confused what is CustomizedResponse in here, as when i reverse the order of both assignments below, it still got the same result:

regards,

IT

mvp_badge
MVP
Rank: #2

Hi Pasar,

CustomizedResponse is the output, and you should assign in the logical order. However, the reason why it still works if you swap the assigns, is because Headers is a List. And like all Lists, when you assign them, they are assigned by reference, meaning that the list itself isn't duplicated, so that a change via one Variable is the same as via another:

Rank: #69385

Hi,am consuming a login api.In the response header, am getting a set-cookie value..How can i access this value so that i can send this value as cookie for other api calls.Attaching my login response trace here.Kindly help

az.png