How to retrieve a value from the request header?
Hi All,
I have a service sending below request headers to my virt.
I want to store the value of the oauth_callback present under Authorization header, highlighted in red and store this in a property and then use it in a subsequent response.
{
'Connection': 'keep-alive',
'Accept': '*/*',
'Content-Length': '0',
'Accept-Encoding': 'gzip, deflate',
'Authorization': 'OAuth oauth_nonce="123123123123123", oauth_timestamp="12312312123", oauth_version="1.0", oauth_signature_method="HMAC-SHA1", oauth_consumer_key="XXXXXXXXXXX", oauth_callback="http%3A%2F%2Flocalhost%3YYYYYYYYY", oauth_signature="AAAAAAAAAAAA"'
}
How can i store this value?
Using below, i am able to store the value of authorization header, however, i can't find a way to get the oauth_callback value.
def acceptEncodingHeaderList = mockRequest.getRequestHeaders().get("Authorization")
Thank You.