RESTful way to create multiple items in one request

后端 未结 7 448
情书的邮戳
情书的邮戳 2020-11-28 18:40

I am working on a small client server program to collect orders. I want to do this in a \"REST(ful) way\".

What I want to do is:

Collect all orderlines (prod

相关标签:
7条回答
  • 2020-11-28 19:24

    Facebook explains how to do this: https://developers.facebook.com/docs/graph-api/making-multiple-requests

    Simple batched requests

    The batch API takes in an array of logical HTTP requests represented as JSON arrays - each request has a method (corresponding to HTTP method GET/PUT/POST/DELETE etc.), a relative_url (the portion of the URL after graph.facebook.com), optional headers array (corresponding to HTTP headers) and an optional body (for POST and PUT requests). The Batch API returns an array of logical HTTP responses represented as JSON arrays - each response has a status code, an optional headers array and an optional body (which is a JSON encoded string).

    0 讨论(0)
提交回复
热议问题