[Solved]-Using django-rest-interface with http put


request.POST processes form-encoded data into a dictionary, which only makes sense for web browser form submissions. There is no equivalent for PUT, as web browsers don’t PUT forms; the data submitted could have any content type. You’ll need to get the raw data out of request.raw_post_data, possibly check the content type, and process it however makes sense for your application.

More information in this thread.


if you figure in the dispatch of ResourceBase there are a line like:

elif request_method == 'PUT':
    return target.update(request, *args, **kwargs)

load_put_and_files let prepare for you the request.PUT with the data y the request.method is PUT, so you dont have to worry about that…

Leave a comment