diff options
Diffstat (limited to 'doc/src/manual/gun.request.asciidoc')
-rw-r--r-- | doc/src/manual/gun.request.asciidoc | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/doc/src/manual/gun.request.asciidoc b/doc/src/manual/gun.request.asciidoc index ec169ac..f5c1cd8 100644 --- a/doc/src/manual/gun.request.asciidoc +++ b/doc/src/manual/gun.request.asciidoc @@ -8,9 +8,6 @@ gun:request - Perform the given request [source,erlang] ---- -request(ConnPid, Method, Path, Headers) - -> StreamRef - request(ConnPid, Method, Path, Headers, Body) -> request(ConnPid, Method, Path, Headers, Body, #{}) @@ -31,15 +28,6 @@ Perform the given request. This is a general purpose function that should only be used when other method-specific functions do not apply. -The behavior of this function varies depending on whether -a body is provided. - -The function `request/4` expects either a content-length -or content-type header to indicate that a body will be -sent afterwards. Gun will assume the request has no body -otherwise. The body can then be sent using -link:man:gun:data(3)[gun:data(3)]. - The function `request/5,6` sends the entire request, including the request body, immediately. It is therefore not possible to use link:man:gun:data(3)[gun:data(3)] after that. You @@ -81,6 +69,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 link:man:gun:headers(3)[gun:headers(3)]. * *1.0*: Function introduced. == Examples @@ -97,6 +88,7 @@ StreamRef = gun:request(ConnPid, <<"PUT">>, == See also link:man:gun(3)[gun(3)], +link:man:gun:headers(3)[gun:headers(3)], link:man:gun:await(3)[gun:await(3)], link:man:gun:await_body(3)[gun:await_body(3)], link:man:gun_push(3)[gun_push(3)], |