-
I am having the following example? Does anyone know how to add extra headers to the client? var api = new ApiClient(new HttpClient());
api.BaseUrl = "https://localhost:50703/api/";
var token = api.ConnectTokenAsync(new AuthRequest()
{
Username = "demo@example.com",
Password = "Pass12345!",
Grant_type = "password"
}).GetAwaiter().GetResult();
Console.WriteLine("Hello, World! " + token.Access_token);
var result = api.BookingsAsync(); // How to add Authorization header here (token.Access_token)? The doc does not say anything. |
Beta Was this translation helpful? Give feedback.
Answered by
Jogai
Apr 14, 2023
Replies: 1 comment
-
First search result: https://stackoverflow.com/questions/14627399/setting-authorization-header-of-httpclient |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
fairking
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First search result: https://stackoverflow.com/questions/14627399/setting-authorization-header-of-httpclient