apiary.io

Adding headers when using httpClient.GetAsync

我是研究僧i 提交于 2019-11-27 06:46:41
Im implementing a api made by other collegues with Apiary.io, in a windows store app project. they show this example of a method i have to implement var baseAddress = new Uri("https://private-a8014-xxxxxx.apiary-mock.com/"); using (var httpClient = new HttpClient{ BaseAddress = baseAddress }) { using(var response = await httpClient.GetAsync("user/list{?organizationId}")) { string responseData = await response.Content.ReadAsStringAsync(); } } in this and some other methods i need to have a header with a token that i get before heres a image of postman( chrome extension ) with the header im