aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/gun.post.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-12-31 17:08:59 +0100
committerLoïc Hoguin <[email protected]>2018-12-31 17:08:59 +0100
commit630bd475e6aa4b9fdde01272236d08305034cb48 (patch)
tree096c732caef432e2dd56fbd4d50a2d949428f5c0 /doc/src/manual/gun.post.asciidoc
parent32779615616fe3ae052eef94d838ecc9180045a7 (diff)
downloadgun-630bd475e6aa4b9fdde01272236d08305034cb48.tar.gz
gun-630bd475e6aa4b9fdde01272236d08305034cb48.tar.bz2
gun-630bd475e6aa4b9fdde01272236d08305034cb48.zip
Separate request/4,5,6 into headers/4,5 and request/5,6
This cleaner separation gets rid of the implicit body check that was causing issues for many users. Now the body is either given explicitly or it is expected via future gun:data/3 calls.
Diffstat (limited to 'doc/src/manual/gun.post.asciidoc')
-rw-r--r--doc/src/manual/gun.post.asciidoc12
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/src/manual/gun.post.asciidoc b/doc/src/manual/gun.post.asciidoc
index e548824..aed8b3f 100644
--- a/doc/src/manual/gun.post.asciidoc
+++ b/doc/src/manual/gun.post.asciidoc
@@ -9,6 +9,9 @@ gun:post - Process the enclosed representation according to a resource's own sem
[source,erlang]
----
post(ConnPid, Path, Headers)
+ -> post(ConnPid, Path, Headers, #{})
+
+post(ConnPid, Path, Headers, ReqOpts)
-> StreamRef
post(ConnPid, Path, Headers, Body)
@@ -31,10 +34,8 @@ own semantics.
The behavior of this function varies depending on whether
a body is provided.
-The function `post/3` expects either a content-length
-or content-type header to indicate that a body will be
-sent afterwards. The body can then be sent using
-link:man:gun:data(3)[gun:data(3)].
+The function `post/3,4` does not send a body. It must be
+sent separately using link:man:gun:data(3)[gun:data(3)].
The function `post/4,5` sends the entire request, including
the request body, immediately. It is therefore not possible
@@ -73,6 +74,9 @@ to this new stream.
== Changelog
+* *2.0*: Implicit body detection has been removed. The body
+ must now be provided either directly (even if empty)
+ or using separate calls.
* *1.0*: Function introduced.
== Examples