How can I authenticate and make requests from an iPhone application to a Django backend to bypass CSRF?

I am working with an iPhone developer who has no Django experience and am relatively new to Django. I created an existing Django application with a web interface that allows the user to log in and add books from our database to my personal library.

We are trying to create an application for the iPhone that allows the user to authenticate and access the library, and I was wondering what is the best way to authenticate and then request the user's library. We started using HTTP POST requests to send credentials to a Django application, but another Django developer I know told me that it would be a cross-domain request that would not work with Django 1.2.

If I cannot perform cross-domain HTTP POST requests, how should I send POST data from an iPhone application to a Django application?

+3
source share
3 answers

CSRF. django 1.4 .

Solution:
  @csrf_exempt
  def PostData(requst):
    pass
+1

HTTP- iphone

-1

Source: https://habr.com/ru/post/1758255/


All Articles