简体   繁体   中英

How to add batch requests handling to Django project?

I have an Django application that provide WEB APIs.

I want to add batch requests (send multiple operations in a single HTTP request) handling to it.

What is the best way to do it?

django-batch-requests seems like a reasonable bare-bones solution. This article gives a better treatment of how batch requests should probably be done in a REST api - basically, the "POST json describing the request" approach is flawed in the same ways SOAP is - and worse, since it makes the behavior of your REST api inconsistent.

Also, Facebook defines a batch requests api if you want something to emulate. They use the SOAP-ish approach.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM