Xamarin csrf-token missing or incorrect using HttpClient
|Added at||2017-01-03 22:01|
I'm trying to run a post request with my Xamarin app. My backend is a Django app which allows all cross origin:
There is no problem when I try to POST, PUT, GET, PATCH, DELETE with my Angular2 app, but when I try with my Xamarin app, my backend returns this error:
My Xamarin c# code looks like that:
As you can see, there is no csrf-token added to the header because a don't know how to get this token with Xamarin.
I've tried some random code like this one:
Or this one, with a random token just to see:
But as expected, it doesn't helps.
I've tried to get the token via a get request but the response doesn't contains any token.
Any idea ?
I'm using the last version of Xamarin Forms (18.104.22.168).