Hi,
We have a REST API and the endpoints required a token to be set which is acquired by making a signIn call (prior to calling any other endpoint).
The name of the custom header that we expect is - "X-Auth-Token".
Now no matter how I call one of the API endpoints which expect a token, I always get an exception - "System.Net.WebException: The remote server returned an error: (401) Unauthorized."
This is the way I make the request -
let token = "qwerr12rtrt..."
type RepositoryResponse = JsonProvider<"./data/repos.json">
let reposResponse =
Http.RequestString(baseRepoUrl, httpMethod = "GET",
headers = [ "X-Auth-Token" token ])
Please let me know if I am missing something here?
Thanks,
Manoj.