diff options
author | Loïc Hoguin <[email protected]> | 2019-01-09 18:23:21 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-01-09 18:23:21 +0100 |
commit | 655adf004ec53a6f38375e3b0a53e485849f8a02 (patch) | |
tree | 470cc41a9c723c222097133fac1e9853a25db5aa /doc/src/guide | |
parent | 6612610964cabadfcf408e4223a702555a3570cb (diff) | |
download | gun-655adf004ec53a6f38375e3b0a53e485849f8a02.tar.gz gun-655adf004ec53a6f38375e3b0a53e485849f8a02.tar.bz2 gun-655adf004ec53a6f38375e3b0a53e485849f8a02.zip |
Improve documentation about gun:headers/4,5
Diffstat (limited to 'doc/src/guide')
-rw-r--r-- | doc/src/guide/http.asciidoc | 9 | ||||
-rw-r--r-- | doc/src/guide/protocols.asciidoc | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/doc/src/guide/http.asciidoc b/doc/src/guide/http.asciidoc index fb0c7dc..382b245 100644 --- a/doc/src/guide/http.asciidoc +++ b/doc/src/guide/http.asciidoc @@ -218,16 +218,17 @@ StreamRef = gun:options(ConnPid, "*"). ==== Requests with an arbitrary method -The `gun:request/4,5,6` function can be used to send requests -with a configurable method name. It is mostly useful when you -need a method that Gun does not understand natively. +The functions `gun:headers/4,5` or `gun:request/5,6` can be +used to send requests with a configurable method name. It is +mostly useful when you need a method that Gun does not +understand natively. .Example of a TRACE request [source,erlang] ---- gun:request(ConnPid, "TRACE", "/", [ {<<"max-forwards">>, "30"} -]). +], <<>>). ---- === Processing responses diff --git a/doc/src/guide/protocols.asciidoc b/doc/src/guide/protocols.asciidoc index 2c4fd10..d2529e3 100644 --- a/doc/src/guide/protocols.asciidoc +++ b/doc/src/guide/protocols.asciidoc @@ -11,9 +11,9 @@ sends a request, the server sends back a response. Gun provides convenience functions for performing GET, HEAD, OPTIONS, POST, PATCH, PUT, and DELETE requests. All these -functions are aliases of `gun:request/4,5,6` for the respective -methods. Gun also provides a `gun:data/4` function for streaming -the request body. +functions are aliases of `gun:headers/4,5` or `gun:request/5,6` +for the respective methods. Gun also provides a `gun:data/4` +function for streaming the request body. Gun will send a `gun_inform` message for every intermediate informational responses received. They will always be sent |