HTTPRequest icon indicating copy to clipboard operation
HTTPRequest copied to clipboard

Using header in request for authentification

Open AlexisBalzano opened this issue 1 year ago • 1 comments

Hey, how do you send a header with the authorisation token inside a request ? i tried like this but I get a bunch of errors... How should I do it ? Capture d'écran 2024-03-24 191713

AlexisBalzano avatar Mar 24 '24 18:03 AlexisBalzano

Since the headers list is a map of string,string you just need to wrap each pair in the parent set of braces.

const auto response = request.send("GET", body, { { "Authorization", "value" } });

richguernsey avatar Jul 08 '24 19:07 richguernsey