Skip to content

NOW MANAGED ON CODEBERG

Added api format advisory regarding PUT/DELETE form data

Dan Brownf79b7bc7994c
diff --git a/resources/views/api-docs/parts/getting-started.blade.php b/resources/views/api-docs/parts/getting-started.blade.php
index 76da73e45..7358b5cd7 100644
--- a/resources/views/api-docs/parts/getting-started.blade.php
+++ b/resources/views/api-docs/parts/getting-started.blade.php
@@ -53,10 +53,19 @@
<ul>
<li>application/json</li>
- <li>application/x-www-form-urlencoded</li>
- <li>multipart/form-data</li>
+ <li>application/x-www-form-urlencoded*</li>
+ <li>multipart/form-data*</li>
</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>
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.