You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Yes you can add the token in httpclient below the code you can check it out
HttpClient client = new HttpClient();
client.BaseAddress = new Uri("https://api.vimeo.com");var byteArray =
Encoding.ASCII.GetBytes(accessToken);
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Basic",
Convert.ToBase64String(byteArray));
var form = new FormUrlEncodedContent(new List<KeyValuePair<string, string>>()
{
new KeyValuePair<string, string>("type","POST")
});var response = await client.PostAsync("/me/videos", form);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Regards,
Ashok Songara
On Tue, Jan 16, 2018 at 2:08 AM, Koen Schauwaert ***@***.***> wrote:
Is it possible (and if so: how?) to add a Bearer Token as authorization in
the header of the HttpClient?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#18>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ9F_2gDdfejKcLDR64DPKOHphhi17jjks5tK7dCgaJpZM4Re62L>
.
Is it possible (and if so: how?) to add a Bearer Token as authorization in the header of the HttpClient?
The text was updated successfully, but these errors were encountered: