I am trying to make a spacetraders.io client and when I try to send the token to the endpoint, I get a message saying that I did not send a token.
Relevant code:
let client = reqwest::Client::new();
let endpoint = "my/agent";
let res = client.get(format!("https://api.spacetraders.io/v2/{}", endpoint))
.form(&data)
.header("Authorization", format!("Bearer {}", token))
.send()
.await
.unwrap();