Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
dev:web_api:v3:write_requests [2017/11/27 04:07] – Remove Zotero 5 warning bwiernik | dev:web_api:v3:write_requests [2018/12/28 02:52] – [JSON Object Data] Removing the Expect header in cURL no longer seems to be required dstillman | ||
---|---|---|---|
Line 61: | Line 61: | ||
$ curl $URL > items.json | $ curl $URL > items.json | ||
$ vi items.json | $ vi items.json | ||
- | $ curl -d @items.json -v -H " | + | $ curl -d @items.json -v $URL |
</ | </ | ||
- | In this example, a JSON array of items is being saved to a text file, modified in a text editor, and then POSTed back to the same URL. (The '' | + | In this example, a JSON array of items is being saved to a text file, modified in a text editor, and then POSTed back to the same URL. |
This approach allows a complicated task such as batch editing to be performed using only cURL and a text editor. Any objects modified in the text file will be updated on the server, while unmodified objects will be left unchanged. | This approach allows a complicated task such as batch editing to be performed using only cURL and a text editor. Any objects modified in the text file will be updated on the server, while unmodified objects will be left unchanged. |