elnormous/HTTPRequest

Using header in request for authentification

Opened this issue · 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

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" } });