AddHeader and GetRequestHeader - HTTPRequestHander
Question
Application Type
Reactive
Service Studio Version
11.11.4 (Build 43812)

Iam trying to send a value via AddHeader  in OnBeforeRquest  in a REST API get method and receive the value via GetRequestHeader in OnAfterResponse . But the value return empty from the GetRequestHeader.

Request.JPG

mvp_badge
MVP

Hi Irfan,

The way to add custom headers to the request is explained in the following post.

Regards,

Nordin

@Nordin Ahdi
Thanks for the reply ,

Am I able to capture the API request and response time using these?

mvp_badge
MVP

Hi Irfan,


To add to what Nordin is mentioning, on the OnBeforeRequest, as the name mentions, you can manipulate the Request.

On the OnAfterResponse, you manipulate the Response, not the Request, so you wouldn't be able to access the request header or request information you had added in the OnBeforeRequest.


Kind Regards,
João 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.