Forum Discussion
SmartBear_Suppo
11 years agoSmartBear Alumni (Retired)
Hi,
Headers are returned as array in case if there are multiple header entry for the same header. In your case, you can update last line of your groovy code on afterSubmit event handler, to get the first element without [] like the following
For being able to send the header you saved on test case property try the following on RequestFilter.afterRequest
Regards,
Shadid
SmartBear Sweden
Headers are returned as array in case if there are multiple header entry for the same header. In your case, you can update last line of your groovy code on afterSubmit event handler, to get the first element without [] like the following
context.testCase.setPropertyValue( "uxfToken", headers.get("authorization").get(0) )
For being able to send the header you saved on test case property try the following on RequestFilter.afterRequest
def headers = request.requestHeaders
headers.put( "uxfauthorization", context.testCase.getPropertyValue( "uxfToken" ) )
request.requestHeaders = headers
Regards,
Shadid
SmartBear Sweden
Related Content
- 2 years agoSiKing