Forum Discussion
Hi All,
I am able to retrieve oauth_callback value into a variable but i can't find a way to store this in custom property.
I want to store this value in custom property and pass the value of this custom property in response of other service present in my project.
def acceptEncodingHeaderList = mockRequest.getRequestHeaders().get("Authorization").toString()
String[] Header = acceptEncodingHeaderList.split(",");
for (int i = 0; i < Header.length; ++i)
{
if(Header[i].contains("oauth_callback"))
{
String[] splitHeader = Header[i].split("=");
String callback = splitHeader[1].getAt(1..-1)
log.info "callback" + oauth_callback
}
To elaborate more with an example,
Suppose , service A sends a request with the authorization header, i want to store the value of oauth_callback from authorization header in custom properties and pass this value in the response of Service B.
Related Content
- 6 years ago
- 5 years ago
Recent Discussions
- 5 days ago
- 10 days ago