How to set X-API-KEY in header of a HTTP request using Rust

Hello there,

Please what crate can I use to set an x-api-key token to header?

What crate do you use to send the request, in the first place? It would provide some way to set the headers, too.

I use the reqwest crate but I can’t seem to find how to do that using that create, If It was just a normal api key I would just use the Authorization struct in the reqwest to do that

Well, in reqwest there's RequestBuilder::header, at least.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.