So I\'m trying to POST form data to my colleague\'s site in order login (simple username and password) from my iPhone app. However, it appears that I need a CSRF Token in o
As pointed out in the comments you could either parse it from any page containing a form on your friend's website.
If you want one for your own ask him to render this template at /ios/
ios.html:
{% csrftoken %}
Then launch a GET request:2 You can parse the value of the token with a regex:
NSString *regex = @"csrfmiddlewaretoken\".*?\"\(.*?\)\"";
Finally you have to set the value of the X-CSRFToken
on your following HTTP POST requests.