-
Notifications
You must be signed in to change notification settings - Fork 1.9k
HttpClient not accepting Authorization headers (401 Unauthorized) #3918
Comments
Hi this doesn't seem a issue related with Xamarin.Forms itself. Trying to help you might want to migrate to use the latest version of Xamarin Forms like 3.2.0 that uses netstandard . You should inspect the headers of the call to see how the request is form. also might want to check if its a https issue or something. Feel free to reopen if you figure is something wrong with Xamarin.Forms. Thanks |
@dush88c dis you solved this issue?? |
In my case, there was '/' at end of the url. Once it's removed. It worked. |
I have the same issue I think this is rather a mono bug... |
I have the same issue does not work on android app but works on postman |
@amirvenus @rmarinho did you found out the reason of this issue? |
I have used System.Net.Http to create an HTTP client to access the Web API GET method which is authorized as below. But it returns unauthorized (401) error always even if it works fine in Postman with same authorization token (Bearer)
I have no idea why this is not working in Xamarin.Forms httpclient ?

Versions
Xamarin Forms : 2.4.0.280
System.Net.Http : MonoAndroid\v1.0\4.0.30319
.Net : 4.5
Thanks
The text was updated successfully, but these errors were encountered: