Added api format advisory regarding PUT/DELETE form data

This commit is contained in:
Dan Brown 2022-09-28 20:15:48 +01:00
parent 60171b3522
commit f79b7bc799
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -53,10 +53,19 @@
<ul> <ul>
<li>application/json</li> <li>application/json</li>
<li>application/x-www-form-urlencoded</li> <li>application/x-www-form-urlencoded*</li>
<li>multipart/form-data</li> <li>multipart/form-data*</li>
</ul> </ul>
<p>
<em>
* Form requests currently only work for POST requests due to how PHP handles request data.
If you need to use these formats for PUT or DELETE requests you can work around this limitation by
using a POST request and providing a "_method" parameter with the value equal to
<code>PUT</code> or <code>DELETE</code>.
</em>
</p>
<p> <p>
Regardless of format chosen, ensure you set a <code>Content-Type</code> header on requests so that the system can correctly parse your request data. Regardless of format chosen, ensure you set a <code>Content-Type</code> header on requests so that the system can correctly parse your request data.
The API is primarily designed to be interfaced using JSON, since responses are always in JSON format, hence examples in this documentation will be shown as JSON. The API is primarily designed to be interfaced using JSON, since responses are always in JSON format, hence examples in this documentation will be shown as JSON.