POST Bodies
When sending a HTTP POST
, you may present your arguments as either standard POST parameters or use multipart/form-data
if file are included.
URL Encoded
When sending URL- encoded data, set your HTTP Content-Type
header to application/x-www-form-urlencoded
and present your key/value pairs according to RFC-3986.
For example, aPOST
request to create a section might look something like this:
In this example, you are creating one section with two elements title
and content
both in English and Italian.
As you can see, every key of an element must be in the form of elements[LOCALE][ELEMENT_NAME]
Multipart Encoded
If you have to send files you must use multipart/form-data
. An example:
In this example, you are creating one section with two elements title
and image
only in English.
As you can see, every key of a media element (image, audio, video, document, file) must be in the form of elements[LOCALE][ELEMENT_NAME][INDEX]
.
Instead relation elements doesn't require a locale so the key must be in the form of ELEMENT_NAME[INDEX]
Last updated