Quantcast
Channel: LoadRunner Practitioners Forum topics
Viewing all articles
Browse latest Browse all 3978

Cannot add an Authorization header to a request.

$
0
0

I'm trying to get this bit of code to work:

    web_cleanup_cookies();
    web_add_header("Content-Type","application/x-www-form-urlencoded");
    web_add_header("Authorization","Basic {encodedBasicKey}");    
    
    web_add_header("My-Own-Header","Some;text;in;here;");
    web_custom_request("getAccessToken", "Method=POST",
               "URL={url}",
               "body=grant_type=client_credentials&scope={scope}",
            LAST); 

Running this gets this in the output log:

AOFunctionLibrary.c(625): POST /bpiSIT6/banks/CB/auth/provider/oauth2/token HTTP/1.1\r\n
AOFunctionLibrary.c(625): Content-Type: application/x-www-form-urlencoded\r\n
AOFunctionLibrary.c(625): My-Own-Header: Some;text;in;here;\r\n
AOFunctionLibrary.c(625): Accept: application/json\r\n

.......and so on

The Authorization header is simply not added, although my made up header was added ok.

Ideas?

 


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>