From e39252ae5048156ac33999ce9bb07212798b6b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 26 Sep 2019 14:05:08 +0200 Subject: Add Gun 2.0-pre documentation But don't propagate via RSS. --- docs/en/gun/1.0/guide/connect/index.html | 2 + docs/en/gun/1.0/guide/http/index.html | 2 + docs/en/gun/1.0/guide/index.html | 2 + docs/en/gun/1.0/guide/introduction/index.html | 2 + docs/en/gun/1.0/guide/protocols/index.html | 2 + docs/en/gun/1.0/guide/start/index.html | 2 + docs/en/gun/1.0/guide/websocket/index.html | 2 + docs/en/gun/1.0/manual/gun.await/index.html | 2 + docs/en/gun/1.0/manual/gun.await_body/index.html | 2 + docs/en/gun/1.0/manual/gun.await_up/index.html | 2 + docs/en/gun/1.0/manual/gun.cancel/index.html | 2 + docs/en/gun/1.0/manual/gun.close/index.html | 2 + docs/en/gun/1.0/manual/gun.data/index.html | 2 + docs/en/gun/1.0/manual/gun.delete/index.html | 2 + docs/en/gun/1.0/manual/gun.flush/index.html | 2 + docs/en/gun/1.0/manual/gun.get/index.html | 2 + docs/en/gun/1.0/manual/gun.head/index.html | 2 + docs/en/gun/1.0/manual/gun.info/index.html | 2 + docs/en/gun/1.0/manual/gun.open/index.html | 2 + docs/en/gun/1.0/manual/gun.open_unix/index.html | 2 + docs/en/gun/1.0/manual/gun.options/index.html | 2 + docs/en/gun/1.0/manual/gun.patch/index.html | 2 + docs/en/gun/1.0/manual/gun.post/index.html | 2 + docs/en/gun/1.0/manual/gun.put/index.html | 2 + docs/en/gun/1.0/manual/gun.request/index.html | 2 + docs/en/gun/1.0/manual/gun.ws_send/index.html | 2 + docs/en/gun/1.0/manual/gun.ws_upgrade/index.html | 2 + docs/en/gun/1.0/manual/gun/index.html | 2 + docs/en/gun/1.0/manual/gun_app/index.html | 2 + docs/en/gun/1.0/manual/gun_data/index.html | 2 + docs/en/gun/1.0/manual/gun_down/index.html | 2 + docs/en/gun/1.0/manual/gun_error/index.html | 2 + docs/en/gun/1.0/manual/gun_inform/index.html | 2 + docs/en/gun/1.0/manual/gun_push/index.html | 2 + docs/en/gun/1.0/manual/gun_response/index.html | 2 + docs/en/gun/1.0/manual/gun_trailers/index.html | 2 + docs/en/gun/1.0/manual/gun_up/index.html | 2 + docs/en/gun/1.0/manual/gun_upgrade/index.html | 2 + docs/en/gun/1.0/manual/gun_ws/index.html | 2 + docs/en/gun/1.0/manual/index.html | 2 + docs/en/gun/1.1/guide/connect/index.html | 2 + docs/en/gun/1.1/guide/http/index.html | 2 + docs/en/gun/1.1/guide/index.html | 2 + docs/en/gun/1.1/guide/introduction/index.html | 2 + .../en/gun/1.1/guide/migrating_from_1.0/index.html | 2 + docs/en/gun/1.1/guide/protocols/index.html | 2 + docs/en/gun/1.1/guide/start/index.html | 2 + docs/en/gun/1.1/guide/websocket/index.html | 2 + docs/en/gun/1.1/manual/gun.await/index.html | 2 + docs/en/gun/1.1/manual/gun.await_body/index.html | 2 + docs/en/gun/1.1/manual/gun.await_up/index.html | 2 + docs/en/gun/1.1/manual/gun.cancel/index.html | 2 + docs/en/gun/1.1/manual/gun.close/index.html | 2 + docs/en/gun/1.1/manual/gun.data/index.html | 2 + docs/en/gun/1.1/manual/gun.delete/index.html | 2 + docs/en/gun/1.1/manual/gun.flush/index.html | 2 + docs/en/gun/1.1/manual/gun.get/index.html | 2 + docs/en/gun/1.1/manual/gun.head/index.html | 2 + docs/en/gun/1.1/manual/gun.info/index.html | 2 + docs/en/gun/1.1/manual/gun.open/index.html | 2 + docs/en/gun/1.1/manual/gun.open_unix/index.html | 2 + docs/en/gun/1.1/manual/gun.options/index.html | 2 + docs/en/gun/1.1/manual/gun.patch/index.html | 2 + docs/en/gun/1.1/manual/gun.post/index.html | 2 + docs/en/gun/1.1/manual/gun.put/index.html | 2 + docs/en/gun/1.1/manual/gun.request/index.html | 2 + docs/en/gun/1.1/manual/gun.ws_send/index.html | 2 + docs/en/gun/1.1/manual/gun.ws_upgrade/index.html | 2 + docs/en/gun/1.1/manual/gun/index.html | 2 + docs/en/gun/1.1/manual/gun_app/index.html | 2 + docs/en/gun/1.1/manual/gun_data/index.html | 2 + docs/en/gun/1.1/manual/gun_down/index.html | 2 + docs/en/gun/1.1/manual/gun_error/index.html | 2 + docs/en/gun/1.1/manual/gun_inform/index.html | 2 + docs/en/gun/1.1/manual/gun_push/index.html | 2 + docs/en/gun/1.1/manual/gun_response/index.html | 2 + docs/en/gun/1.1/manual/gun_trailers/index.html | 2 + docs/en/gun/1.1/manual/gun_up/index.html | 2 + docs/en/gun/1.1/manual/gun_upgrade/index.html | 2 + docs/en/gun/1.1/manual/gun_ws/index.html | 2 + docs/en/gun/1.1/manual/index.html | 2 + docs/en/gun/1.2/guide/connect/index.html | 2 + docs/en/gun/1.2/guide/http/index.html | 2 + docs/en/gun/1.2/guide/index.html | 2 + docs/en/gun/1.2/guide/introduction/index.html | 2 + .../en/gun/1.2/guide/migrating_from_1.0/index.html | 2 + .../en/gun/1.2/guide/migrating_from_1.1/index.html | 2 + docs/en/gun/1.2/guide/protocols/index.html | 2 + docs/en/gun/1.2/guide/start/index.html | 2 + docs/en/gun/1.2/guide/websocket/index.html | 2 + docs/en/gun/1.2/manual/gun.await/index.html | 2 + docs/en/gun/1.2/manual/gun.await_body/index.html | 2 + docs/en/gun/1.2/manual/gun.await_up/index.html | 2 + docs/en/gun/1.2/manual/gun.cancel/index.html | 2 + docs/en/gun/1.2/manual/gun.close/index.html | 2 + docs/en/gun/1.2/manual/gun.connect/index.html | 2 + docs/en/gun/1.2/manual/gun.data/index.html | 2 + docs/en/gun/1.2/manual/gun.delete/index.html | 2 + docs/en/gun/1.2/manual/gun.flush/index.html | 2 + docs/en/gun/1.2/manual/gun.get/index.html | 2 + docs/en/gun/1.2/manual/gun.head/index.html | 2 + docs/en/gun/1.2/manual/gun.info/index.html | 2 + docs/en/gun/1.2/manual/gun.open/index.html | 2 + docs/en/gun/1.2/manual/gun.open_unix/index.html | 2 + docs/en/gun/1.2/manual/gun.options/index.html | 2 + docs/en/gun/1.2/manual/gun.patch/index.html | 2 + docs/en/gun/1.2/manual/gun.post/index.html | 2 + docs/en/gun/1.2/manual/gun.put/index.html | 2 + docs/en/gun/1.2/manual/gun.request/index.html | 2 + docs/en/gun/1.2/manual/gun.ws_send/index.html | 2 + docs/en/gun/1.2/manual/gun.ws_upgrade/index.html | 2 + docs/en/gun/1.2/manual/gun/index.html | 2 + docs/en/gun/1.2/manual/gun_app/index.html | 2 + docs/en/gun/1.2/manual/gun_data/index.html | 2 + docs/en/gun/1.2/manual/gun_down/index.html | 2 + docs/en/gun/1.2/manual/gun_error/index.html | 2 + docs/en/gun/1.2/manual/gun_inform/index.html | 2 + docs/en/gun/1.2/manual/gun_push/index.html | 2 + docs/en/gun/1.2/manual/gun_response/index.html | 2 + docs/en/gun/1.2/manual/gun_trailers/index.html | 2 + docs/en/gun/1.2/manual/gun_up/index.html | 2 + docs/en/gun/1.2/manual/gun_upgrade/index.html | 2 + docs/en/gun/1.2/manual/gun_ws/index.html | 2 + docs/en/gun/1.2/manual/index.html | 2 + docs/en/gun/1.3/guide/connect/index.html | 2 + docs/en/gun/1.3/guide/http/index.html | 2 + docs/en/gun/1.3/guide/index.html | 2 + docs/en/gun/1.3/guide/introduction/index.html | 2 + .../en/gun/1.3/guide/migrating_from_1.0/index.html | 2 + .../en/gun/1.3/guide/migrating_from_1.1/index.html | 2 + .../en/gun/1.3/guide/migrating_from_1.2/index.html | 2 + docs/en/gun/1.3/guide/protocols/index.html | 2 + docs/en/gun/1.3/guide/start/index.html | 2 + docs/en/gun/1.3/guide/websocket/index.html | 2 + docs/en/gun/1.3/manual/gun.await/index.html | 2 + docs/en/gun/1.3/manual/gun.await_body/index.html | 2 + docs/en/gun/1.3/manual/gun.await_up/index.html | 2 + docs/en/gun/1.3/manual/gun.cancel/index.html | 2 + docs/en/gun/1.3/manual/gun.close/index.html | 2 + docs/en/gun/1.3/manual/gun.connect/index.html | 2 + docs/en/gun/1.3/manual/gun.data/index.html | 2 + docs/en/gun/1.3/manual/gun.delete/index.html | 2 + docs/en/gun/1.3/manual/gun.flush/index.html | 2 + docs/en/gun/1.3/manual/gun.get/index.html | 2 + docs/en/gun/1.3/manual/gun.head/index.html | 2 + docs/en/gun/1.3/manual/gun.info/index.html | 2 + docs/en/gun/1.3/manual/gun.open/index.html | 2 + docs/en/gun/1.3/manual/gun.open_unix/index.html | 2 + docs/en/gun/1.3/manual/gun.options/index.html | 2 + docs/en/gun/1.3/manual/gun.patch/index.html | 2 + docs/en/gun/1.3/manual/gun.post/index.html | 2 + docs/en/gun/1.3/manual/gun.put/index.html | 2 + docs/en/gun/1.3/manual/gun.request/index.html | 2 + docs/en/gun/1.3/manual/gun.ws_send/index.html | 2 + docs/en/gun/1.3/manual/gun.ws_upgrade/index.html | 2 + docs/en/gun/1.3/manual/gun/index.html | 2 + docs/en/gun/1.3/manual/gun_app/index.html | 2 + docs/en/gun/1.3/manual/gun_data/index.html | 2 + docs/en/gun/1.3/manual/gun_down/index.html | 2 + docs/en/gun/1.3/manual/gun_error/index.html | 2 + docs/en/gun/1.3/manual/gun_inform/index.html | 2 + docs/en/gun/1.3/manual/gun_push/index.html | 2 + docs/en/gun/1.3/manual/gun_response/index.html | 2 + docs/en/gun/1.3/manual/gun_trailers/index.html | 2 + docs/en/gun/1.3/manual/gun_up/index.html | 2 + docs/en/gun/1.3/manual/gun_upgrade/index.html | 2 + docs/en/gun/1.3/manual/gun_ws/index.html | 2 + docs/en/gun/1.3/manual/index.html | 2 + docs/en/gun/2.0/guide/connect.asciidoc | 166 ++++++ docs/en/gun/2.0/guide/connect/index.html | 277 ++++++++++ docs/en/gun/2.0/guide/gun.sty | 8 + docs/en/gun/2.0/guide/http.asciidoc | 387 ++++++++++++++ docs/en/gun/2.0/guide/http/index.html | 451 ++++++++++++++++ docs/en/gun/2.0/guide/index.html | 179 +++++++ docs/en/gun/2.0/guide/introduction.asciidoc | 55 ++ docs/en/gun/2.0/guide/introduction/index.html | 203 +++++++ docs/en/gun/2.0/guide/migrating_from_1.0.asciidoc | 21 + .../en/gun/2.0/guide/migrating_from_1.0/index.html | 188 +++++++ docs/en/gun/2.0/guide/migrating_from_1.1.asciidoc | 28 + .../en/gun/2.0/guide/migrating_from_1.1/index.html | 194 +++++++ docs/en/gun/2.0/guide/migrating_from_1.2.asciidoc | 39 ++ .../en/gun/2.0/guide/migrating_from_1.2/index.html | 204 +++++++ docs/en/gun/2.0/guide/protocols.asciidoc | 127 +++++ docs/en/gun/2.0/guide/protocols/index.html | 330 ++++++++++++ docs/en/gun/2.0/guide/start.asciidoc | 43 ++ docs/en/gun/2.0/guide/start/index.html | 209 ++++++++ docs/en/gun/2.0/guide/websocket.asciidoc | 124 +++++ docs/en/gun/2.0/guide/websocket/index.html | 263 +++++++++ docs/en/gun/2.0/manual/gun.await/index.html | 255 +++++++++ docs/en/gun/2.0/manual/gun.await_body/index.html | 223 ++++++++ docs/en/gun/2.0/manual/gun.await_up/index.html | 214 ++++++++ docs/en/gun/2.0/manual/gun.cancel/index.html | 198 +++++++ docs/en/gun/2.0/manual/gun.close/index.html | 190 +++++++ docs/en/gun/2.0/manual/gun.connect/index.html | 251 +++++++++ docs/en/gun/2.0/manual/gun.data/index.html | 209 ++++++++ docs/en/gun/2.0/manual/gun.delete/index.html | 218 ++++++++ docs/en/gun/2.0/manual/gun.flush/index.html | 203 +++++++ docs/en/gun/2.0/manual/gun.get/index.html | 221 ++++++++ docs/en/gun/2.0/manual/gun.head/index.html | 223 ++++++++ docs/en/gun/2.0/manual/gun.headers/index.html | 215 ++++++++ docs/en/gun/2.0/manual/gun.info/index.html | 212 ++++++++ docs/en/gun/2.0/manual/gun.open/index.html | 218 ++++++++ docs/en/gun/2.0/manual/gun.open_unix/index.html | 206 ++++++++ docs/en/gun/2.0/manual/gun.options/index.html | 218 ++++++++ docs/en/gun/2.0/manual/gun.patch/index.html | 246 +++++++++ docs/en/gun/2.0/manual/gun.post/index.html | 244 +++++++++ docs/en/gun/2.0/manual/gun.put/index.html | 244 +++++++++ docs/en/gun/2.0/manual/gun.request/index.html | 222 ++++++++ docs/en/gun/2.0/manual/gun.set_owner/index.html | 196 +++++++ docs/en/gun/2.0/manual/gun.shutdown/index.html | 200 +++++++ docs/en/gun/2.0/manual/gun.stream_info/index.html | 199 +++++++ docs/en/gun/2.0/manual/gun.update_flow/index.html | 200 +++++++ docs/en/gun/2.0/manual/gun.ws_send/index.html | 208 ++++++++ docs/en/gun/2.0/manual/gun.ws_upgrade/index.html | 231 ++++++++ docs/en/gun/2.0/manual/gun/index.html | 586 +++++++++++++++++++++ docs/en/gun/2.0/manual/gun_app/index.html | 183 +++++++ docs/en/gun/2.0/manual/gun_data/index.html | 207 ++++++++ docs/en/gun/2.0/manual/gun_down/index.html | 209 ++++++++ docs/en/gun/2.0/manual/gun_error/index.html | 206 ++++++++ docs/en/gun/2.0/manual/gun_inform/index.html | 206 ++++++++ docs/en/gun/2.0/manual/gun_push/index.html | 226 ++++++++ docs/en/gun/2.0/manual/gun_response/index.html | 209 ++++++++ docs/en/gun/2.0/manual/gun_socks_up/index.html | 198 +++++++ docs/en/gun/2.0/manual/gun_trailers/index.html | 201 +++++++ docs/en/gun/2.0/manual/gun_up/index.html | 198 +++++++ docs/en/gun/2.0/manual/gun_upgrade/index.html | 207 ++++++++ docs/en/gun/2.0/manual/gun_ws/index.html | 206 ++++++++ docs/en/gun/2.0/manual/index.html | 183 +++++++ docs/index.html | 7 + 229 files changed, 12728 insertions(+) create mode 100644 docs/en/gun/2.0/guide/connect.asciidoc create mode 100644 docs/en/gun/2.0/guide/connect/index.html create mode 100644 docs/en/gun/2.0/guide/gun.sty create mode 100644 docs/en/gun/2.0/guide/http.asciidoc create mode 100644 docs/en/gun/2.0/guide/http/index.html create mode 100644 docs/en/gun/2.0/guide/index.html create mode 100644 docs/en/gun/2.0/guide/introduction.asciidoc create mode 100644 docs/en/gun/2.0/guide/introduction/index.html create mode 100644 docs/en/gun/2.0/guide/migrating_from_1.0.asciidoc create mode 100644 docs/en/gun/2.0/guide/migrating_from_1.0/index.html create mode 100644 docs/en/gun/2.0/guide/migrating_from_1.1.asciidoc create mode 100644 docs/en/gun/2.0/guide/migrating_from_1.1/index.html create mode 100644 docs/en/gun/2.0/guide/migrating_from_1.2.asciidoc create mode 100644 docs/en/gun/2.0/guide/migrating_from_1.2/index.html create mode 100644 docs/en/gun/2.0/guide/protocols.asciidoc create mode 100644 docs/en/gun/2.0/guide/protocols/index.html create mode 100644 docs/en/gun/2.0/guide/start.asciidoc create mode 100644 docs/en/gun/2.0/guide/start/index.html create mode 100644 docs/en/gun/2.0/guide/websocket.asciidoc create mode 100644 docs/en/gun/2.0/guide/websocket/index.html create mode 100644 docs/en/gun/2.0/manual/gun.await/index.html create mode 100644 docs/en/gun/2.0/manual/gun.await_body/index.html create mode 100644 docs/en/gun/2.0/manual/gun.await_up/index.html create mode 100644 docs/en/gun/2.0/manual/gun.cancel/index.html create mode 100644 docs/en/gun/2.0/manual/gun.close/index.html create mode 100644 docs/en/gun/2.0/manual/gun.connect/index.html create mode 100644 docs/en/gun/2.0/manual/gun.data/index.html create mode 100644 docs/en/gun/2.0/manual/gun.delete/index.html create mode 100644 docs/en/gun/2.0/manual/gun.flush/index.html create mode 100644 docs/en/gun/2.0/manual/gun.get/index.html create mode 100644 docs/en/gun/2.0/manual/gun.head/index.html create mode 100644 docs/en/gun/2.0/manual/gun.headers/index.html create mode 100644 docs/en/gun/2.0/manual/gun.info/index.html create mode 100644 docs/en/gun/2.0/manual/gun.open/index.html create mode 100644 docs/en/gun/2.0/manual/gun.open_unix/index.html create mode 100644 docs/en/gun/2.0/manual/gun.options/index.html create mode 100644 docs/en/gun/2.0/manual/gun.patch/index.html create mode 100644 docs/en/gun/2.0/manual/gun.post/index.html create mode 100644 docs/en/gun/2.0/manual/gun.put/index.html create mode 100644 docs/en/gun/2.0/manual/gun.request/index.html create mode 100644 docs/en/gun/2.0/manual/gun.set_owner/index.html create mode 100644 docs/en/gun/2.0/manual/gun.shutdown/index.html create mode 100644 docs/en/gun/2.0/manual/gun.stream_info/index.html create mode 100644 docs/en/gun/2.0/manual/gun.update_flow/index.html create mode 100644 docs/en/gun/2.0/manual/gun.ws_send/index.html create mode 100644 docs/en/gun/2.0/manual/gun.ws_upgrade/index.html create mode 100644 docs/en/gun/2.0/manual/gun/index.html create mode 100644 docs/en/gun/2.0/manual/gun_app/index.html create mode 100644 docs/en/gun/2.0/manual/gun_data/index.html create mode 100644 docs/en/gun/2.0/manual/gun_down/index.html create mode 100644 docs/en/gun/2.0/manual/gun_error/index.html create mode 100644 docs/en/gun/2.0/manual/gun_inform/index.html create mode 100644 docs/en/gun/2.0/manual/gun_push/index.html create mode 100644 docs/en/gun/2.0/manual/gun_response/index.html create mode 100644 docs/en/gun/2.0/manual/gun_socks_up/index.html create mode 100644 docs/en/gun/2.0/manual/gun_trailers/index.html create mode 100644 docs/en/gun/2.0/manual/gun_up/index.html create mode 100644 docs/en/gun/2.0/manual/gun_upgrade/index.html create mode 100644 docs/en/gun/2.0/manual/gun_ws/index.html create mode 100644 docs/en/gun/2.0/manual/index.html (limited to 'docs') diff --git a/docs/en/gun/1.0/guide/connect/index.html b/docs/en/gun/1.0/guide/connect/index.html index 9fd2cb64..24d62fff 100644 --- a/docs/en/gun/1.0/guide/connect/index.html +++ b/docs/en/gun/1.0/guide/connect/index.html @@ -216,6 +216,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/guide/http/index.html b/docs/en/gun/1.0/guide/http/index.html index fa56687a..0fd7edea 100644 --- a/docs/en/gun/1.0/guide/http/index.html +++ b/docs/en/gun/1.0/guide/http/index.html @@ -391,6 +391,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/guide/index.html b/docs/en/gun/1.0/guide/index.html index 3744cac8..d9e4b2dc 100644 --- a/docs/en/gun/1.0/guide/index.html +++ b/docs/en/gun/1.0/guide/index.html @@ -110,6 +110,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/guide/introduction/index.html b/docs/en/gun/1.0/guide/introduction/index.html index ec9a5445..b5d9df89 100644 --- a/docs/en/gun/1.0/guide/introduction/index.html +++ b/docs/en/gun/1.0/guide/introduction/index.html @@ -143,6 +143,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/guide/protocols/index.html b/docs/en/gun/1.0/guide/protocols/index.html index 37e50525..19b838bc 100644 --- a/docs/en/gun/1.0/guide/protocols/index.html +++ b/docs/en/gun/1.0/guide/protocols/index.html @@ -270,6 +270,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/guide/start/index.html b/docs/en/gun/1.0/guide/start/index.html index b04f42f1..54908b09 100644 --- a/docs/en/gun/1.0/guide/start/index.html +++ b/docs/en/gun/1.0/guide/start/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/guide/websocket/index.html b/docs/en/gun/1.0/guide/websocket/index.html index 79ef227e..c2e93866 100644 --- a/docs/en/gun/1.0/guide/websocket/index.html +++ b/docs/en/gun/1.0/guide/websocket/index.html @@ -196,6 +196,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.await/index.html b/docs/en/gun/1.0/manual/gun.await/index.html index 2f2179d1..9212d186 100644 --- a/docs/en/gun/1.0/manual/gun.await/index.html +++ b/docs/en/gun/1.0/manual/gun.await/index.html @@ -184,6 +184,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.await_body/index.html b/docs/en/gun/1.0/manual/gun.await_body/index.html index 6b248eb6..a5e3f249 100644 --- a/docs/en/gun/1.0/manual/gun.await_body/index.html +++ b/docs/en/gun/1.0/manual/gun.await_body/index.html @@ -160,6 +160,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.await_up/index.html b/docs/en/gun/1.0/manual/gun.await_up/index.html index 3c35b64f..daa117f9 100644 --- a/docs/en/gun/1.0/manual/gun.await_up/index.html +++ b/docs/en/gun/1.0/manual/gun.await_up/index.html @@ -152,6 +152,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.cancel/index.html b/docs/en/gun/1.0/manual/gun.cancel/index.html index bf57d868..9b31215d 100644 --- a/docs/en/gun/1.0/manual/gun.cancel/index.html +++ b/docs/en/gun/1.0/manual/gun.cancel/index.html @@ -138,6 +138,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.close/index.html b/docs/en/gun/1.0/manual/gun.close/index.html index 48e80f52..ac219ffe 100644 --- a/docs/en/gun/1.0/manual/gun.close/index.html +++ b/docs/en/gun/1.0/manual/gun.close/index.html @@ -130,6 +130,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.data/index.html b/docs/en/gun/1.0/manual/gun.data/index.html index 5a2ac587..92f4562b 100644 --- a/docs/en/gun/1.0/manual/gun.data/index.html +++ b/docs/en/gun/1.0/manual/gun.data/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.delete/index.html b/docs/en/gun/1.0/manual/gun.delete/index.html index 35c72817..d0588332 100644 --- a/docs/en/gun/1.0/manual/gun.delete/index.html +++ b/docs/en/gun/1.0/manual/gun.delete/index.html @@ -158,6 +158,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.flush/index.html b/docs/en/gun/1.0/manual/gun.flush/index.html index c38497f2..994e95a2 100644 --- a/docs/en/gun/1.0/manual/gun.flush/index.html +++ b/docs/en/gun/1.0/manual/gun.flush/index.html @@ -143,6 +143,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.get/index.html b/docs/en/gun/1.0/manual/gun.get/index.html index 130e435b..ed91978b 100644 --- a/docs/en/gun/1.0/manual/gun.get/index.html +++ b/docs/en/gun/1.0/manual/gun.get/index.html @@ -161,6 +161,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.head/index.html b/docs/en/gun/1.0/manual/gun.head/index.html index 33ed5604..9117883c 100644 --- a/docs/en/gun/1.0/manual/gun.head/index.html +++ b/docs/en/gun/1.0/manual/gun.head/index.html @@ -163,6 +163,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.info/index.html b/docs/en/gun/1.0/manual/gun.info/index.html index 3bc8a284..6af93f15 100644 --- a/docs/en/gun/1.0/manual/gun.info/index.html +++ b/docs/en/gun/1.0/manual/gun.info/index.html @@ -134,6 +134,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.open/index.html b/docs/en/gun/1.0/manual/gun.open/index.html index f22fc58e..9d5a9f63 100644 --- a/docs/en/gun/1.0/manual/gun.open/index.html +++ b/docs/en/gun/1.0/manual/gun.open/index.html @@ -154,6 +154,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.open_unix/index.html b/docs/en/gun/1.0/manual/gun.open_unix/index.html index 52930184..8190ad90 100644 --- a/docs/en/gun/1.0/manual/gun.open_unix/index.html +++ b/docs/en/gun/1.0/manual/gun.open_unix/index.html @@ -142,6 +142,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.options/index.html b/docs/en/gun/1.0/manual/gun.options/index.html index 91749650..8c5f1d00 100644 --- a/docs/en/gun/1.0/manual/gun.options/index.html +++ b/docs/en/gun/1.0/manual/gun.options/index.html @@ -158,6 +158,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.patch/index.html b/docs/en/gun/1.0/manual/gun.patch/index.html index 131e5e7d..4e49d36e 100644 --- a/docs/en/gun/1.0/manual/gun.patch/index.html +++ b/docs/en/gun/1.0/manual/gun.patch/index.html @@ -181,6 +181,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.post/index.html b/docs/en/gun/1.0/manual/gun.post/index.html index 5e4821b8..a4a4b76a 100644 --- a/docs/en/gun/1.0/manual/gun.post/index.html +++ b/docs/en/gun/1.0/manual/gun.post/index.html @@ -179,6 +179,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.put/index.html b/docs/en/gun/1.0/manual/gun.put/index.html index 40841942..f567d1ba 100644 --- a/docs/en/gun/1.0/manual/gun.put/index.html +++ b/docs/en/gun/1.0/manual/gun.put/index.html @@ -179,6 +179,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.request/index.html b/docs/en/gun/1.0/manual/gun.request/index.html index ce3d7c40..27cd43c8 100644 --- a/docs/en/gun/1.0/manual/gun.request/index.html +++ b/docs/en/gun/1.0/manual/gun.request/index.html @@ -165,6 +165,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.ws_send/index.html b/docs/en/gun/1.0/manual/gun.ws_send/index.html index 18babe00..52edb5e7 100644 --- a/docs/en/gun/1.0/manual/gun.ws_send/index.html +++ b/docs/en/gun/1.0/manual/gun.ws_send/index.html @@ -147,6 +147,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun.ws_upgrade/index.html b/docs/en/gun/1.0/manual/gun.ws_upgrade/index.html index bd7fc160..0634c2c8 100644 --- a/docs/en/gun/1.0/manual/gun.ws_upgrade/index.html +++ b/docs/en/gun/1.0/manual/gun.ws_upgrade/index.html @@ -171,6 +171,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun/index.html b/docs/en/gun/1.0/manual/gun/index.html index f8a8df16..43a55935 100644 --- a/docs/en/gun/1.0/manual/gun/index.html +++ b/docs/en/gun/1.0/manual/gun/index.html @@ -309,6 +309,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun_app/index.html b/docs/en/gun/1.0/manual/gun_app/index.html index b3ce361f..10a4799a 100644 --- a/docs/en/gun/1.0/manual/gun_app/index.html +++ b/docs/en/gun/1.0/manual/gun_app/index.html @@ -123,6 +123,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun_data/index.html b/docs/en/gun/1.0/manual/gun_data/index.html index 9030cee1..f79277c5 100644 --- a/docs/en/gun/1.0/manual/gun_data/index.html +++ b/docs/en/gun/1.0/manual/gun_data/index.html @@ -147,6 +147,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun_down/index.html b/docs/en/gun/1.0/manual/gun_down/index.html index e842807e..2e37bb72 100644 --- a/docs/en/gun/1.0/manual/gun_down/index.html +++ b/docs/en/gun/1.0/manual/gun_down/index.html @@ -153,6 +153,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun_error/index.html b/docs/en/gun/1.0/manual/gun_error/index.html index 7d76a468..823ed9e3 100644 --- a/docs/en/gun/1.0/manual/gun_error/index.html +++ b/docs/en/gun/1.0/manual/gun_error/index.html @@ -146,6 +146,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun_inform/index.html b/docs/en/gun/1.0/manual/gun_inform/index.html index 756454a6..49987b19 100644 --- a/docs/en/gun/1.0/manual/gun_inform/index.html +++ b/docs/en/gun/1.0/manual/gun_inform/index.html @@ -146,6 +146,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun_push/index.html b/docs/en/gun/1.0/manual/gun_push/index.html index 14697fdd..5cceeec0 100644 --- a/docs/en/gun/1.0/manual/gun_push/index.html +++ b/docs/en/gun/1.0/manual/gun_push/index.html @@ -166,6 +166,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun_response/index.html b/docs/en/gun/1.0/manual/gun_response/index.html index b73e99c5..3bdf324a 100644 --- a/docs/en/gun/1.0/manual/gun_response/index.html +++ b/docs/en/gun/1.0/manual/gun_response/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun_trailers/index.html b/docs/en/gun/1.0/manual/gun_trailers/index.html index 2ed4b357..17f2223c 100644 --- a/docs/en/gun/1.0/manual/gun_trailers/index.html +++ b/docs/en/gun/1.0/manual/gun_trailers/index.html @@ -141,6 +141,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun_up/index.html b/docs/en/gun/1.0/manual/gun_up/index.html index 7bcd673d..a26fc55b 100644 --- a/docs/en/gun/1.0/manual/gun_up/index.html +++ b/docs/en/gun/1.0/manual/gun_up/index.html @@ -137,6 +137,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun_upgrade/index.html b/docs/en/gun/1.0/manual/gun_upgrade/index.html index bdd77442..f2a1c6da 100644 --- a/docs/en/gun/1.0/manual/gun_upgrade/index.html +++ b/docs/en/gun/1.0/manual/gun_upgrade/index.html @@ -147,6 +147,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/gun_ws/index.html b/docs/en/gun/1.0/manual/gun_ws/index.html index f2598c68..5f4d66ec 100644 --- a/docs/en/gun/1.0/manual/gun_ws/index.html +++ b/docs/en/gun/1.0/manual/gun_ws/index.html @@ -143,6 +143,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.0/manual/index.html b/docs/en/gun/1.0/manual/index.html index fc99f058..6905f4b2 100644 --- a/docs/en/gun/1.0/manual/index.html +++ b/docs/en/gun/1.0/manual/index.html @@ -123,6 +123,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/guide/connect/index.html b/docs/en/gun/1.1/guide/connect/index.html index e634da7e..7aa168b1 100644 --- a/docs/en/gun/1.1/guide/connect/index.html +++ b/docs/en/gun/1.1/guide/connect/index.html @@ -216,6 +216,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/guide/http/index.html b/docs/en/gun/1.1/guide/http/index.html index fca530ef..59cfb9a1 100644 --- a/docs/en/gun/1.1/guide/http/index.html +++ b/docs/en/gun/1.1/guide/http/index.html @@ -391,6 +391,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/guide/index.html b/docs/en/gun/1.1/guide/index.html index 4d68836f..283474a2 100644 --- a/docs/en/gun/1.1/guide/index.html +++ b/docs/en/gun/1.1/guide/index.html @@ -115,6 +115,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/guide/introduction/index.html b/docs/en/gun/1.1/guide/introduction/index.html index 607deffa..71136d08 100644 --- a/docs/en/gun/1.1/guide/introduction/index.html +++ b/docs/en/gun/1.1/guide/introduction/index.html @@ -143,6 +143,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/guide/migrating_from_1.0/index.html b/docs/en/gun/1.1/guide/migrating_from_1.0/index.html index d844673a..c5b7f059 100644 --- a/docs/en/gun/1.1/guide/migrating_from_1.0/index.html +++ b/docs/en/gun/1.1/guide/migrating_from_1.0/index.html @@ -128,6 +128,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/guide/protocols/index.html b/docs/en/gun/1.1/guide/protocols/index.html index d567a71b..c8406384 100644 --- a/docs/en/gun/1.1/guide/protocols/index.html +++ b/docs/en/gun/1.1/guide/protocols/index.html @@ -270,6 +270,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/guide/start/index.html b/docs/en/gun/1.1/guide/start/index.html index 8652025f..4a7f7702 100644 --- a/docs/en/gun/1.1/guide/start/index.html +++ b/docs/en/gun/1.1/guide/start/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/guide/websocket/index.html b/docs/en/gun/1.1/guide/websocket/index.html index d0d870af..6ffbda96 100644 --- a/docs/en/gun/1.1/guide/websocket/index.html +++ b/docs/en/gun/1.1/guide/websocket/index.html @@ -200,6 +200,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.await/index.html b/docs/en/gun/1.1/manual/gun.await/index.html index 9677a82f..14fbe6eb 100644 --- a/docs/en/gun/1.1/manual/gun.await/index.html +++ b/docs/en/gun/1.1/manual/gun.await/index.html @@ -184,6 +184,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.await_body/index.html b/docs/en/gun/1.1/manual/gun.await_body/index.html index f5c181cd..2e78031e 100644 --- a/docs/en/gun/1.1/manual/gun.await_body/index.html +++ b/docs/en/gun/1.1/manual/gun.await_body/index.html @@ -160,6 +160,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.await_up/index.html b/docs/en/gun/1.1/manual/gun.await_up/index.html index 82d817ab..b971e083 100644 --- a/docs/en/gun/1.1/manual/gun.await_up/index.html +++ b/docs/en/gun/1.1/manual/gun.await_up/index.html @@ -152,6 +152,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.cancel/index.html b/docs/en/gun/1.1/manual/gun.cancel/index.html index 175c2f28..5ff64617 100644 --- a/docs/en/gun/1.1/manual/gun.cancel/index.html +++ b/docs/en/gun/1.1/manual/gun.cancel/index.html @@ -138,6 +138,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.close/index.html b/docs/en/gun/1.1/manual/gun.close/index.html index ff396e62..9e8e5b42 100644 --- a/docs/en/gun/1.1/manual/gun.close/index.html +++ b/docs/en/gun/1.1/manual/gun.close/index.html @@ -130,6 +130,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.data/index.html b/docs/en/gun/1.1/manual/gun.data/index.html index 25633b8c..15a574f8 100644 --- a/docs/en/gun/1.1/manual/gun.data/index.html +++ b/docs/en/gun/1.1/manual/gun.data/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.delete/index.html b/docs/en/gun/1.1/manual/gun.delete/index.html index 2021a352..ed89a6ab 100644 --- a/docs/en/gun/1.1/manual/gun.delete/index.html +++ b/docs/en/gun/1.1/manual/gun.delete/index.html @@ -158,6 +158,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.flush/index.html b/docs/en/gun/1.1/manual/gun.flush/index.html index b426d793..351512fe 100644 --- a/docs/en/gun/1.1/manual/gun.flush/index.html +++ b/docs/en/gun/1.1/manual/gun.flush/index.html @@ -143,6 +143,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.get/index.html b/docs/en/gun/1.1/manual/gun.get/index.html index cac4ef56..4fcbe6d4 100644 --- a/docs/en/gun/1.1/manual/gun.get/index.html +++ b/docs/en/gun/1.1/manual/gun.get/index.html @@ -161,6 +161,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.head/index.html b/docs/en/gun/1.1/manual/gun.head/index.html index 1e2c037d..cab1c923 100644 --- a/docs/en/gun/1.1/manual/gun.head/index.html +++ b/docs/en/gun/1.1/manual/gun.head/index.html @@ -163,6 +163,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.info/index.html b/docs/en/gun/1.1/manual/gun.info/index.html index cd19e6ac..86d1ce94 100644 --- a/docs/en/gun/1.1/manual/gun.info/index.html +++ b/docs/en/gun/1.1/manual/gun.info/index.html @@ -134,6 +134,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.open/index.html b/docs/en/gun/1.1/manual/gun.open/index.html index e219c3bc..31627af8 100644 --- a/docs/en/gun/1.1/manual/gun.open/index.html +++ b/docs/en/gun/1.1/manual/gun.open/index.html @@ -154,6 +154,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.open_unix/index.html b/docs/en/gun/1.1/manual/gun.open_unix/index.html index e5f68487..88e7209c 100644 --- a/docs/en/gun/1.1/manual/gun.open_unix/index.html +++ b/docs/en/gun/1.1/manual/gun.open_unix/index.html @@ -142,6 +142,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.options/index.html b/docs/en/gun/1.1/manual/gun.options/index.html index 8210c28c..d17789da 100644 --- a/docs/en/gun/1.1/manual/gun.options/index.html +++ b/docs/en/gun/1.1/manual/gun.options/index.html @@ -158,6 +158,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.patch/index.html b/docs/en/gun/1.1/manual/gun.patch/index.html index dc2b1b18..3d27fbc7 100644 --- a/docs/en/gun/1.1/manual/gun.patch/index.html +++ b/docs/en/gun/1.1/manual/gun.patch/index.html @@ -181,6 +181,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.post/index.html b/docs/en/gun/1.1/manual/gun.post/index.html index 65774928..57b73182 100644 --- a/docs/en/gun/1.1/manual/gun.post/index.html +++ b/docs/en/gun/1.1/manual/gun.post/index.html @@ -179,6 +179,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.put/index.html b/docs/en/gun/1.1/manual/gun.put/index.html index c8c8d307..6e3ec792 100644 --- a/docs/en/gun/1.1/manual/gun.put/index.html +++ b/docs/en/gun/1.1/manual/gun.put/index.html @@ -179,6 +179,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.request/index.html b/docs/en/gun/1.1/manual/gun.request/index.html index b99e4c9b..61733c36 100644 --- a/docs/en/gun/1.1/manual/gun.request/index.html +++ b/docs/en/gun/1.1/manual/gun.request/index.html @@ -165,6 +165,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.ws_send/index.html b/docs/en/gun/1.1/manual/gun.ws_send/index.html index 4420cab3..4f3a3550 100644 --- a/docs/en/gun/1.1/manual/gun.ws_send/index.html +++ b/docs/en/gun/1.1/manual/gun.ws_send/index.html @@ -147,6 +147,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun.ws_upgrade/index.html b/docs/en/gun/1.1/manual/gun.ws_upgrade/index.html index e6a18fa0..bd980358 100644 --- a/docs/en/gun/1.1/manual/gun.ws_upgrade/index.html +++ b/docs/en/gun/1.1/manual/gun.ws_upgrade/index.html @@ -171,6 +171,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun/index.html b/docs/en/gun/1.1/manual/gun/index.html index 65ba1b1e..e3849bdb 100644 --- a/docs/en/gun/1.1/manual/gun/index.html +++ b/docs/en/gun/1.1/manual/gun/index.html @@ -309,6 +309,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun_app/index.html b/docs/en/gun/1.1/manual/gun_app/index.html index 14812d86..5456bcaa 100644 --- a/docs/en/gun/1.1/manual/gun_app/index.html +++ b/docs/en/gun/1.1/manual/gun_app/index.html @@ -123,6 +123,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun_data/index.html b/docs/en/gun/1.1/manual/gun_data/index.html index 77ac6fbb..8aa2517e 100644 --- a/docs/en/gun/1.1/manual/gun_data/index.html +++ b/docs/en/gun/1.1/manual/gun_data/index.html @@ -147,6 +147,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun_down/index.html b/docs/en/gun/1.1/manual/gun_down/index.html index 6401c0e7..a865c5fe 100644 --- a/docs/en/gun/1.1/manual/gun_down/index.html +++ b/docs/en/gun/1.1/manual/gun_down/index.html @@ -153,6 +153,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun_error/index.html b/docs/en/gun/1.1/manual/gun_error/index.html index e363b519..38d347b5 100644 --- a/docs/en/gun/1.1/manual/gun_error/index.html +++ b/docs/en/gun/1.1/manual/gun_error/index.html @@ -146,6 +146,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun_inform/index.html b/docs/en/gun/1.1/manual/gun_inform/index.html index b11ab360..22d8ecd2 100644 --- a/docs/en/gun/1.1/manual/gun_inform/index.html +++ b/docs/en/gun/1.1/manual/gun_inform/index.html @@ -146,6 +146,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun_push/index.html b/docs/en/gun/1.1/manual/gun_push/index.html index 0b71295f..732669a4 100644 --- a/docs/en/gun/1.1/manual/gun_push/index.html +++ b/docs/en/gun/1.1/manual/gun_push/index.html @@ -166,6 +166,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun_response/index.html b/docs/en/gun/1.1/manual/gun_response/index.html index 0ee79622..11363a8a 100644 --- a/docs/en/gun/1.1/manual/gun_response/index.html +++ b/docs/en/gun/1.1/manual/gun_response/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun_trailers/index.html b/docs/en/gun/1.1/manual/gun_trailers/index.html index 5c75225b..47380ce1 100644 --- a/docs/en/gun/1.1/manual/gun_trailers/index.html +++ b/docs/en/gun/1.1/manual/gun_trailers/index.html @@ -141,6 +141,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun_up/index.html b/docs/en/gun/1.1/manual/gun_up/index.html index b63aaad7..da857c59 100644 --- a/docs/en/gun/1.1/manual/gun_up/index.html +++ b/docs/en/gun/1.1/manual/gun_up/index.html @@ -137,6 +137,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun_upgrade/index.html b/docs/en/gun/1.1/manual/gun_upgrade/index.html index cb5c8613..37f89658 100644 --- a/docs/en/gun/1.1/manual/gun_upgrade/index.html +++ b/docs/en/gun/1.1/manual/gun_upgrade/index.html @@ -147,6 +147,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/gun_ws/index.html b/docs/en/gun/1.1/manual/gun_ws/index.html index 9f7f7442..1526ed4c 100644 --- a/docs/en/gun/1.1/manual/gun_ws/index.html +++ b/docs/en/gun/1.1/manual/gun_ws/index.html @@ -143,6 +143,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.1/manual/index.html b/docs/en/gun/1.1/manual/index.html index 84bc7c6a..26898308 100644 --- a/docs/en/gun/1.1/manual/index.html +++ b/docs/en/gun/1.1/manual/index.html @@ -123,6 +123,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/guide/connect/index.html b/docs/en/gun/1.2/guide/connect/index.html index d4ab1f88..8b7dc3cd 100644 --- a/docs/en/gun/1.2/guide/connect/index.html +++ b/docs/en/gun/1.2/guide/connect/index.html @@ -216,6 +216,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/guide/http/index.html b/docs/en/gun/1.2/guide/http/index.html index 8c057341..d6e8e67c 100644 --- a/docs/en/gun/1.2/guide/http/index.html +++ b/docs/en/gun/1.2/guide/http/index.html @@ -391,6 +391,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/guide/index.html b/docs/en/gun/1.2/guide/index.html index 4f4debd5..65ab4b4c 100644 --- a/docs/en/gun/1.2/guide/index.html +++ b/docs/en/gun/1.2/guide/index.html @@ -117,6 +117,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/guide/introduction/index.html b/docs/en/gun/1.2/guide/introduction/index.html index 9d4e23f8..c3d849be 100644 --- a/docs/en/gun/1.2/guide/introduction/index.html +++ b/docs/en/gun/1.2/guide/introduction/index.html @@ -143,6 +143,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/guide/migrating_from_1.0/index.html b/docs/en/gun/1.2/guide/migrating_from_1.0/index.html index 6a644772..78862e65 100644 --- a/docs/en/gun/1.2/guide/migrating_from_1.0/index.html +++ b/docs/en/gun/1.2/guide/migrating_from_1.0/index.html @@ -128,6 +128,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/guide/migrating_from_1.1/index.html b/docs/en/gun/1.2/guide/migrating_from_1.1/index.html index 180030e2..19c78506 100644 --- a/docs/en/gun/1.2/guide/migrating_from_1.1/index.html +++ b/docs/en/gun/1.2/guide/migrating_from_1.1/index.html @@ -134,6 +134,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/guide/protocols/index.html b/docs/en/gun/1.2/guide/protocols/index.html index 396115ed..f0afae03 100644 --- a/docs/en/gun/1.2/guide/protocols/index.html +++ b/docs/en/gun/1.2/guide/protocols/index.html @@ -270,6 +270,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/guide/start/index.html b/docs/en/gun/1.2/guide/start/index.html index 052889d0..2f447961 100644 --- a/docs/en/gun/1.2/guide/start/index.html +++ b/docs/en/gun/1.2/guide/start/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/guide/websocket/index.html b/docs/en/gun/1.2/guide/websocket/index.html index c240be1c..faa9c21f 100644 --- a/docs/en/gun/1.2/guide/websocket/index.html +++ b/docs/en/gun/1.2/guide/websocket/index.html @@ -200,6 +200,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.await/index.html b/docs/en/gun/1.2/manual/gun.await/index.html index 49ac8ff1..25e94bf1 100644 --- a/docs/en/gun/1.2/manual/gun.await/index.html +++ b/docs/en/gun/1.2/manual/gun.await/index.html @@ -184,6 +184,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.await_body/index.html b/docs/en/gun/1.2/manual/gun.await_body/index.html index c46d06e0..c1dc0829 100644 --- a/docs/en/gun/1.2/manual/gun.await_body/index.html +++ b/docs/en/gun/1.2/manual/gun.await_body/index.html @@ -160,6 +160,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.await_up/index.html b/docs/en/gun/1.2/manual/gun.await_up/index.html index 6c5f2d49..daec2fc4 100644 --- a/docs/en/gun/1.2/manual/gun.await_up/index.html +++ b/docs/en/gun/1.2/manual/gun.await_up/index.html @@ -152,6 +152,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.cancel/index.html b/docs/en/gun/1.2/manual/gun.cancel/index.html index 723fd59d..8c5f2031 100644 --- a/docs/en/gun/1.2/manual/gun.cancel/index.html +++ b/docs/en/gun/1.2/manual/gun.cancel/index.html @@ -138,6 +138,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.close/index.html b/docs/en/gun/1.2/manual/gun.close/index.html index 0bc1a938..40e314b1 100644 --- a/docs/en/gun/1.2/manual/gun.close/index.html +++ b/docs/en/gun/1.2/manual/gun.close/index.html @@ -130,6 +130,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.connect/index.html b/docs/en/gun/1.2/manual/gun.connect/index.html index c3d91d76..ad3594a1 100644 --- a/docs/en/gun/1.2/manual/gun.connect/index.html +++ b/docs/en/gun/1.2/manual/gun.connect/index.html @@ -191,6 +191,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.data/index.html b/docs/en/gun/1.2/manual/gun.data/index.html index a5187e39..a7c65314 100644 --- a/docs/en/gun/1.2/manual/gun.data/index.html +++ b/docs/en/gun/1.2/manual/gun.data/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.delete/index.html b/docs/en/gun/1.2/manual/gun.delete/index.html index f994b92b..b1492f9c 100644 --- a/docs/en/gun/1.2/manual/gun.delete/index.html +++ b/docs/en/gun/1.2/manual/gun.delete/index.html @@ -158,6 +158,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.flush/index.html b/docs/en/gun/1.2/manual/gun.flush/index.html index 96c51461..f9d4fc6d 100644 --- a/docs/en/gun/1.2/manual/gun.flush/index.html +++ b/docs/en/gun/1.2/manual/gun.flush/index.html @@ -143,6 +143,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.get/index.html b/docs/en/gun/1.2/manual/gun.get/index.html index 37203947..7f45b986 100644 --- a/docs/en/gun/1.2/manual/gun.get/index.html +++ b/docs/en/gun/1.2/manual/gun.get/index.html @@ -161,6 +161,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.head/index.html b/docs/en/gun/1.2/manual/gun.head/index.html index 30a3dd71..86085f1e 100644 --- a/docs/en/gun/1.2/manual/gun.head/index.html +++ b/docs/en/gun/1.2/manual/gun.head/index.html @@ -163,6 +163,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.info/index.html b/docs/en/gun/1.2/manual/gun.info/index.html index f275d597..7b113943 100644 --- a/docs/en/gun/1.2/manual/gun.info/index.html +++ b/docs/en/gun/1.2/manual/gun.info/index.html @@ -134,6 +134,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.open/index.html b/docs/en/gun/1.2/manual/gun.open/index.html index 0da0808a..3d529407 100644 --- a/docs/en/gun/1.2/manual/gun.open/index.html +++ b/docs/en/gun/1.2/manual/gun.open/index.html @@ -154,6 +154,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.open_unix/index.html b/docs/en/gun/1.2/manual/gun.open_unix/index.html index d862beed..953b127f 100644 --- a/docs/en/gun/1.2/manual/gun.open_unix/index.html +++ b/docs/en/gun/1.2/manual/gun.open_unix/index.html @@ -142,6 +142,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.options/index.html b/docs/en/gun/1.2/manual/gun.options/index.html index 972c5d08..1f88938b 100644 --- a/docs/en/gun/1.2/manual/gun.options/index.html +++ b/docs/en/gun/1.2/manual/gun.options/index.html @@ -158,6 +158,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.patch/index.html b/docs/en/gun/1.2/manual/gun.patch/index.html index 6ec60738..1b435b3f 100644 --- a/docs/en/gun/1.2/manual/gun.patch/index.html +++ b/docs/en/gun/1.2/manual/gun.patch/index.html @@ -181,6 +181,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.post/index.html b/docs/en/gun/1.2/manual/gun.post/index.html index b3365c42..2d3ce187 100644 --- a/docs/en/gun/1.2/manual/gun.post/index.html +++ b/docs/en/gun/1.2/manual/gun.post/index.html @@ -179,6 +179,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.put/index.html b/docs/en/gun/1.2/manual/gun.put/index.html index 169394e8..08974e6b 100644 --- a/docs/en/gun/1.2/manual/gun.put/index.html +++ b/docs/en/gun/1.2/manual/gun.put/index.html @@ -179,6 +179,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.request/index.html b/docs/en/gun/1.2/manual/gun.request/index.html index d50af260..d89ff0c1 100644 --- a/docs/en/gun/1.2/manual/gun.request/index.html +++ b/docs/en/gun/1.2/manual/gun.request/index.html @@ -165,6 +165,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.ws_send/index.html b/docs/en/gun/1.2/manual/gun.ws_send/index.html index f7678c14..198b5765 100644 --- a/docs/en/gun/1.2/manual/gun.ws_send/index.html +++ b/docs/en/gun/1.2/manual/gun.ws_send/index.html @@ -147,6 +147,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun.ws_upgrade/index.html b/docs/en/gun/1.2/manual/gun.ws_upgrade/index.html index f07b4c5f..1da38236 100644 --- a/docs/en/gun/1.2/manual/gun.ws_upgrade/index.html +++ b/docs/en/gun/1.2/manual/gun.ws_upgrade/index.html @@ -171,6 +171,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun/index.html b/docs/en/gun/1.2/manual/gun/index.html index d4630a9a..d7fea7b7 100644 --- a/docs/en/gun/1.2/manual/gun/index.html +++ b/docs/en/gun/1.2/manual/gun/index.html @@ -357,6 +357,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun_app/index.html b/docs/en/gun/1.2/manual/gun_app/index.html index 478479c2..691b87b4 100644 --- a/docs/en/gun/1.2/manual/gun_app/index.html +++ b/docs/en/gun/1.2/manual/gun_app/index.html @@ -123,6 +123,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun_data/index.html b/docs/en/gun/1.2/manual/gun_data/index.html index ca194ace..d582ed44 100644 --- a/docs/en/gun/1.2/manual/gun_data/index.html +++ b/docs/en/gun/1.2/manual/gun_data/index.html @@ -147,6 +147,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun_down/index.html b/docs/en/gun/1.2/manual/gun_down/index.html index 3afbf006..30316336 100644 --- a/docs/en/gun/1.2/manual/gun_down/index.html +++ b/docs/en/gun/1.2/manual/gun_down/index.html @@ -153,6 +153,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun_error/index.html b/docs/en/gun/1.2/manual/gun_error/index.html index dae0f3e2..d809c267 100644 --- a/docs/en/gun/1.2/manual/gun_error/index.html +++ b/docs/en/gun/1.2/manual/gun_error/index.html @@ -146,6 +146,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun_inform/index.html b/docs/en/gun/1.2/manual/gun_inform/index.html index b6463dd3..4e2bcd8f 100644 --- a/docs/en/gun/1.2/manual/gun_inform/index.html +++ b/docs/en/gun/1.2/manual/gun_inform/index.html @@ -146,6 +146,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun_push/index.html b/docs/en/gun/1.2/manual/gun_push/index.html index 84cd82fc..b0db9619 100644 --- a/docs/en/gun/1.2/manual/gun_push/index.html +++ b/docs/en/gun/1.2/manual/gun_push/index.html @@ -166,6 +166,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun_response/index.html b/docs/en/gun/1.2/manual/gun_response/index.html index 8f89df89..c655c918 100644 --- a/docs/en/gun/1.2/manual/gun_response/index.html +++ b/docs/en/gun/1.2/manual/gun_response/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun_trailers/index.html b/docs/en/gun/1.2/manual/gun_trailers/index.html index a9ee058b..d02e74f9 100644 --- a/docs/en/gun/1.2/manual/gun_trailers/index.html +++ b/docs/en/gun/1.2/manual/gun_trailers/index.html @@ -141,6 +141,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun_up/index.html b/docs/en/gun/1.2/manual/gun_up/index.html index e292d769..988d588f 100644 --- a/docs/en/gun/1.2/manual/gun_up/index.html +++ b/docs/en/gun/1.2/manual/gun_up/index.html @@ -137,6 +137,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun_upgrade/index.html b/docs/en/gun/1.2/manual/gun_upgrade/index.html index b69ff0de..109621ef 100644 --- a/docs/en/gun/1.2/manual/gun_upgrade/index.html +++ b/docs/en/gun/1.2/manual/gun_upgrade/index.html @@ -147,6 +147,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/gun_ws/index.html b/docs/en/gun/1.2/manual/gun_ws/index.html index 1294bfaa..b5d8e849 100644 --- a/docs/en/gun/1.2/manual/gun_ws/index.html +++ b/docs/en/gun/1.2/manual/gun_ws/index.html @@ -143,6 +143,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.2/manual/index.html b/docs/en/gun/1.2/manual/index.html index dbac41ce..232c514e 100644 --- a/docs/en/gun/1.2/manual/index.html +++ b/docs/en/gun/1.2/manual/index.html @@ -123,6 +123,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/guide/connect/index.html b/docs/en/gun/1.3/guide/connect/index.html index f0d83ba0..576cafb7 100644 --- a/docs/en/gun/1.3/guide/connect/index.html +++ b/docs/en/gun/1.3/guide/connect/index.html @@ -216,6 +216,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/guide/http/index.html b/docs/en/gun/1.3/guide/http/index.html index 986c1ecb..0b49a3f1 100644 --- a/docs/en/gun/1.3/guide/http/index.html +++ b/docs/en/gun/1.3/guide/http/index.html @@ -391,6 +391,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/guide/index.html b/docs/en/gun/1.3/guide/index.html index b915bae5..e5e0f372 100644 --- a/docs/en/gun/1.3/guide/index.html +++ b/docs/en/gun/1.3/guide/index.html @@ -119,6 +119,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/guide/introduction/index.html b/docs/en/gun/1.3/guide/introduction/index.html index 5fc019cc..5f738ad0 100644 --- a/docs/en/gun/1.3/guide/introduction/index.html +++ b/docs/en/gun/1.3/guide/introduction/index.html @@ -143,6 +143,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/guide/migrating_from_1.0/index.html b/docs/en/gun/1.3/guide/migrating_from_1.0/index.html index 08b5b595..d84aea7c 100644 --- a/docs/en/gun/1.3/guide/migrating_from_1.0/index.html +++ b/docs/en/gun/1.3/guide/migrating_from_1.0/index.html @@ -128,6 +128,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/guide/migrating_from_1.1/index.html b/docs/en/gun/1.3/guide/migrating_from_1.1/index.html index 29252b79..33e8308a 100644 --- a/docs/en/gun/1.3/guide/migrating_from_1.1/index.html +++ b/docs/en/gun/1.3/guide/migrating_from_1.1/index.html @@ -134,6 +134,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/guide/migrating_from_1.2/index.html b/docs/en/gun/1.3/guide/migrating_from_1.2/index.html index e305e121..90d11248 100644 --- a/docs/en/gun/1.3/guide/migrating_from_1.2/index.html +++ b/docs/en/gun/1.3/guide/migrating_from_1.2/index.html @@ -144,6 +144,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/guide/protocols/index.html b/docs/en/gun/1.3/guide/protocols/index.html index d31253fc..aef51b3b 100644 --- a/docs/en/gun/1.3/guide/protocols/index.html +++ b/docs/en/gun/1.3/guide/protocols/index.html @@ -270,6 +270,8 @@ +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/guide/start/index.html b/docs/en/gun/1.3/guide/start/index.html index b59a5c82..deabae16 100644 --- a/docs/en/gun/1.3/guide/start/index.html +++ b/docs/en/gun/1.3/guide/start/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/guide/websocket/index.html b/docs/en/gun/1.3/guide/websocket/index.html index 0f5599c3..c258df84 100644 --- a/docs/en/gun/1.3/guide/websocket/index.html +++ b/docs/en/gun/1.3/guide/websocket/index.html @@ -210,6 +210,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.await/index.html b/docs/en/gun/1.3/manual/gun.await/index.html index f0de8ffd..30c748ff 100644 --- a/docs/en/gun/1.3/manual/gun.await/index.html +++ b/docs/en/gun/1.3/manual/gun.await/index.html @@ -184,6 +184,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.await_body/index.html b/docs/en/gun/1.3/manual/gun.await_body/index.html index d84ffb61..0c683eca 100644 --- a/docs/en/gun/1.3/manual/gun.await_body/index.html +++ b/docs/en/gun/1.3/manual/gun.await_body/index.html @@ -160,6 +160,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.await_up/index.html b/docs/en/gun/1.3/manual/gun.await_up/index.html index aa335c36..1e9f6cc5 100644 --- a/docs/en/gun/1.3/manual/gun.await_up/index.html +++ b/docs/en/gun/1.3/manual/gun.await_up/index.html @@ -152,6 +152,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.cancel/index.html b/docs/en/gun/1.3/manual/gun.cancel/index.html index 47fa582e..d36f6819 100644 --- a/docs/en/gun/1.3/manual/gun.cancel/index.html +++ b/docs/en/gun/1.3/manual/gun.cancel/index.html @@ -138,6 +138,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.close/index.html b/docs/en/gun/1.3/manual/gun.close/index.html index df5523c3..41d017d4 100644 --- a/docs/en/gun/1.3/manual/gun.close/index.html +++ b/docs/en/gun/1.3/manual/gun.close/index.html @@ -130,6 +130,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.connect/index.html b/docs/en/gun/1.3/manual/gun.connect/index.html index 80258210..5df95f76 100644 --- a/docs/en/gun/1.3/manual/gun.connect/index.html +++ b/docs/en/gun/1.3/manual/gun.connect/index.html @@ -191,6 +191,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.data/index.html b/docs/en/gun/1.3/manual/gun.data/index.html index 0f32b54e..4977ccfb 100644 --- a/docs/en/gun/1.3/manual/gun.data/index.html +++ b/docs/en/gun/1.3/manual/gun.data/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.delete/index.html b/docs/en/gun/1.3/manual/gun.delete/index.html index e074833c..54422a6d 100644 --- a/docs/en/gun/1.3/manual/gun.delete/index.html +++ b/docs/en/gun/1.3/manual/gun.delete/index.html @@ -158,6 +158,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.flush/index.html b/docs/en/gun/1.3/manual/gun.flush/index.html index 2ce795c6..9cd73195 100644 --- a/docs/en/gun/1.3/manual/gun.flush/index.html +++ b/docs/en/gun/1.3/manual/gun.flush/index.html @@ -143,6 +143,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.get/index.html b/docs/en/gun/1.3/manual/gun.get/index.html index da22c1ff..0060291f 100644 --- a/docs/en/gun/1.3/manual/gun.get/index.html +++ b/docs/en/gun/1.3/manual/gun.get/index.html @@ -161,6 +161,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.head/index.html b/docs/en/gun/1.3/manual/gun.head/index.html index 3ca16b11..3871e048 100644 --- a/docs/en/gun/1.3/manual/gun.head/index.html +++ b/docs/en/gun/1.3/manual/gun.head/index.html @@ -163,6 +163,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.info/index.html b/docs/en/gun/1.3/manual/gun.info/index.html index 05d8dbdc..facf23b5 100644 --- a/docs/en/gun/1.3/manual/gun.info/index.html +++ b/docs/en/gun/1.3/manual/gun.info/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.open/index.html b/docs/en/gun/1.3/manual/gun.open/index.html index b1d02a8d..17d95644 100644 --- a/docs/en/gun/1.3/manual/gun.open/index.html +++ b/docs/en/gun/1.3/manual/gun.open/index.html @@ -154,6 +154,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.open_unix/index.html b/docs/en/gun/1.3/manual/gun.open_unix/index.html index cbba6a00..b8999723 100644 --- a/docs/en/gun/1.3/manual/gun.open_unix/index.html +++ b/docs/en/gun/1.3/manual/gun.open_unix/index.html @@ -142,6 +142,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.options/index.html b/docs/en/gun/1.3/manual/gun.options/index.html index 2a0ce0df..f62da2c0 100644 --- a/docs/en/gun/1.3/manual/gun.options/index.html +++ b/docs/en/gun/1.3/manual/gun.options/index.html @@ -158,6 +158,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.patch/index.html b/docs/en/gun/1.3/manual/gun.patch/index.html index 2f3aa847..3c83ffd7 100644 --- a/docs/en/gun/1.3/manual/gun.patch/index.html +++ b/docs/en/gun/1.3/manual/gun.patch/index.html @@ -181,6 +181,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.post/index.html b/docs/en/gun/1.3/manual/gun.post/index.html index c566697b..b1ae8888 100644 --- a/docs/en/gun/1.3/manual/gun.post/index.html +++ b/docs/en/gun/1.3/manual/gun.post/index.html @@ -179,6 +179,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.put/index.html b/docs/en/gun/1.3/manual/gun.put/index.html index 3fc5d7c9..9504f2a0 100644 --- a/docs/en/gun/1.3/manual/gun.put/index.html +++ b/docs/en/gun/1.3/manual/gun.put/index.html @@ -179,6 +179,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.request/index.html b/docs/en/gun/1.3/manual/gun.request/index.html index 11d3238e..d718f07a 100644 --- a/docs/en/gun/1.3/manual/gun.request/index.html +++ b/docs/en/gun/1.3/manual/gun.request/index.html @@ -165,6 +165,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.ws_send/index.html b/docs/en/gun/1.3/manual/gun.ws_send/index.html index a744b54a..658c9045 100644 --- a/docs/en/gun/1.3/manual/gun.ws_send/index.html +++ b/docs/en/gun/1.3/manual/gun.ws_send/index.html @@ -147,6 +147,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun.ws_upgrade/index.html b/docs/en/gun/1.3/manual/gun.ws_upgrade/index.html index a39d8171..4452a8e2 100644 --- a/docs/en/gun/1.3/manual/gun.ws_upgrade/index.html +++ b/docs/en/gun/1.3/manual/gun.ws_upgrade/index.html @@ -171,6 +171,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun/index.html b/docs/en/gun/1.3/manual/gun/index.html index 20f2a82d..8abc280a 100644 --- a/docs/en/gun/1.3/manual/gun/index.html +++ b/docs/en/gun/1.3/manual/gun/index.html @@ -363,6 +363,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun_app/index.html b/docs/en/gun/1.3/manual/gun_app/index.html index 8d12f7ba..06c9858a 100644 --- a/docs/en/gun/1.3/manual/gun_app/index.html +++ b/docs/en/gun/1.3/manual/gun_app/index.html @@ -123,6 +123,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun_data/index.html b/docs/en/gun/1.3/manual/gun_data/index.html index 8f55d91b..15ebea6d 100644 --- a/docs/en/gun/1.3/manual/gun_data/index.html +++ b/docs/en/gun/1.3/manual/gun_data/index.html @@ -147,6 +147,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun_down/index.html b/docs/en/gun/1.3/manual/gun_down/index.html index de3d145a..e27840a8 100644 --- a/docs/en/gun/1.3/manual/gun_down/index.html +++ b/docs/en/gun/1.3/manual/gun_down/index.html @@ -153,6 +153,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun_error/index.html b/docs/en/gun/1.3/manual/gun_error/index.html index 278fd2de..d4e74ff1 100644 --- a/docs/en/gun/1.3/manual/gun_error/index.html +++ b/docs/en/gun/1.3/manual/gun_error/index.html @@ -146,6 +146,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun_inform/index.html b/docs/en/gun/1.3/manual/gun_inform/index.html index e0685f5a..f69219c4 100644 --- a/docs/en/gun/1.3/manual/gun_inform/index.html +++ b/docs/en/gun/1.3/manual/gun_inform/index.html @@ -146,6 +146,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun_push/index.html b/docs/en/gun/1.3/manual/gun_push/index.html index 76268627..3398fa51 100644 --- a/docs/en/gun/1.3/manual/gun_push/index.html +++ b/docs/en/gun/1.3/manual/gun_push/index.html @@ -166,6 +166,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun_response/index.html b/docs/en/gun/1.3/manual/gun_response/index.html index 43ceaf11..23acd08b 100644 --- a/docs/en/gun/1.3/manual/gun_response/index.html +++ b/docs/en/gun/1.3/manual/gun_response/index.html @@ -149,6 +149,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun_trailers/index.html b/docs/en/gun/1.3/manual/gun_trailers/index.html index 63062282..82dc8fca 100644 --- a/docs/en/gun/1.3/manual/gun_trailers/index.html +++ b/docs/en/gun/1.3/manual/gun_trailers/index.html @@ -141,6 +141,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun_up/index.html b/docs/en/gun/1.3/manual/gun_up/index.html index 35bf7753..7b95810a 100644 --- a/docs/en/gun/1.3/manual/gun_up/index.html +++ b/docs/en/gun/1.3/manual/gun_up/index.html @@ -137,6 +137,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun_upgrade/index.html b/docs/en/gun/1.3/manual/gun_upgrade/index.html index 3229a0d8..886b8cfa 100644 --- a/docs/en/gun/1.3/manual/gun_upgrade/index.html +++ b/docs/en/gun/1.3/manual/gun_upgrade/index.html @@ -147,6 +147,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/gun_ws/index.html b/docs/en/gun/1.3/manual/gun_ws/index.html index 018e8ec9..9ab1b2bc 100644 --- a/docs/en/gun/1.3/manual/gun_ws/index.html +++ b/docs/en/gun/1.3/manual/gun_ws/index.html @@ -143,6 +143,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/1.3/manual/index.html b/docs/en/gun/1.3/manual/index.html index 3d2f9b21..187eeba4 100644 --- a/docs/en/gun/1.3/manual/index.html +++ b/docs/en/gun/1.3/manual/index.html @@ -123,6 +123,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.0
  • +
  • 1.3
  • 1.2
  • diff --git a/docs/en/gun/2.0/guide/connect.asciidoc b/docs/en/gun/2.0/guide/connect.asciidoc new file mode 100644 index 00000000..08f8db29 --- /dev/null +++ b/docs/en/gun/2.0/guide/connect.asciidoc @@ -0,0 +1,166 @@ +[[connect]] +== Connection + +This chapter describes how to open, monitor and close +a connection using the Gun client. + +=== Gun connections + +Gun is designed with the HTTP/2 and Websocket protocols in mind. +They are built for long-running connections that allow concurrent +exchange of data, either in the form of request/responses for +HTTP/2 or in the form of messages for Websocket. + +A Gun connection is an Erlang process that manages a socket to +a remote endpoint. This Gun connection is owned by a user +process that is called the _owner_ of the connection, and is +managed by the supervision tree of the `gun` application. + +Any process can communicate with the Gun connection +by calling functions from the module `gun`. All functions +perform their respective operations asynchronously. The Gun +connection will send Erlang messages to the calling process +whenever needed. + +When the remote endpoint closes the connection, Gun attempts +to reconnect automatically. + +=== Opening a new connection + +The `gun:open/2,3` function must be used to open a connection. + +.Opening a connection to example.org on port 443 +[source,erlang] +---- +{ok, ConnPid} = gun:open("example.org", 443). +---- + +If the port given is 443, Gun will attempt to connect using +TLS. The protocol will be selected automatically using the +ALPN extension for TLS. By default Gun supports HTTP/2 +and HTTP/1.1 when connecting using TLS. + +For any other port, Gun will attempt to connect using +plain TCP and will use the HTTP/1.1 protocol. + +The transport and protocol used can be overriden via +options. The manual documents all available options. + +Options can be provided as a third argument, and take the +form of a map. + +.Opening a TLS connection to example.org on port 8443 +[source,erlang] +---- +{ok, ConnPid} = gun:open("example.org", 8443, #{transport => tls}). +---- + +When using TLS you may want to tweak the +http://erlang.org/doc/man/ssl_app.html#configuration[configuration] +for the `ssl` application, in particular the `session_lifetime` +and `session_cache_client_max` to limit the amount of memory +used for the TLS sessions cache. + +=== Waiting for the connection to be established + +When Gun successfully connects to the server, it sends a +`gun_up` message with the protocol that has been selected +for the connection. + +Gun provides the functions `gun:await_up/1,2,3` that wait +for the `gun_up` message. They can optionally take a monitor +reference and/or timeout value. If no monitor is provided, +one will be created for the duration of the function call. + +.Synchronous opening of a connection +[source,erlang] +---- +{ok, ConnPid} = gun:open("example.org", 443), +{ok, Protocol} = gun:await_up(ConnPid). +---- + +=== Handling connection loss + +When the connection is lost, Gun will send a `gun_down` +message indicating the current protocol, the reason the +connection was lost and two lists of stream references. + +The first list indicates open streams that _may_ have been +processed by the server. The second list indicates open +streams that the server did not process. + +=== Monitoring the connection process + +Because software errors are unavoidable, it is important to +detect when the Gun process crashes. It is also important +to detect when it exits normally. Erlang provides two ways +to do that: links and monitors. + +Gun leaves you the choice as to which one will be used. +However, if you use the `gun:await/2,3` or `gun:await_body/2,3` +functions, a monitor may be used for you to avoid getting +stuck waiting for a message that will never come. + +If you choose to monitor yourself you can do it on a permanent +basis rather than on every message you will receive, saving +resources. Indeed, the `gun:await/3,4` and `gun:await_body/3,4` +functions both accept a monitor argument if you have one already. + +.Monitoring the connection process +[source,erlang] +---- +{ok, ConnPid} = gun:open("example.org", 443). +MRef = monitor(process, ConnPid). +---- + +This monitor reference can be kept and used until the connection +process exits. + +.Handling `DOWN` messages +[source,erlang] +---- +receive + %% Receive Gun messages here... + {'DOWN', Mref, process, ConnPid, Reason} -> + error_logger:error_msg("Oops!"), + exit(Reason) +end. +---- + +What to do when you receive a `DOWN` message is entirely up to you. + +=== Closing the connection abruptly + +The connection can be stopped abruptly at any time by calling +the `gun:close/1` function. + +.Immediate closing of the connection +[source,erlang] +---- +gun:close(ConnPid). +---- + +The process is stopped immediately without having a chance to +perform the protocol's closing handshake, if any. + +//=== Closing the connection gracefully +// +//The connection can also be stopped gracefully by calling the +//`gun:shutdown/1` function. +// +//.Graceful shutdown of the connection +//[source,erlang] +//---- +//gun:shutdown(ConnPid). +//---- +// +//Gun will refuse any new requests or messages after you call +//this function. It will however continue to send you messages +//for existing streams until they are all completed. +// +//For example if you performed a GET request just before calling +//`gun:shutdown/1`, you will still receive the response before +//Gun closes the connection. +// +//If you set a monitor beforehand, you will receive a message +//when the connection has been closed. diff --git a/docs/en/gun/2.0/guide/connect/index.html b/docs/en/gun/2.0/guide/connect/index.html new file mode 100644 index 00000000..06000bf7 --- /dev/null +++ b/docs/en/gun/2.0/guide/connect/index.html @@ -0,0 +1,277 @@ + + + + + + + + + + Nine Nines: Connection + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    Connection

    + +

    This chapter describes how to open, monitor and close a connection using the Gun client.

    +

    Gun connections

    +

    Gun is designed with the HTTP/2 and Websocket protocols in mind. They are built for long-running connections that allow concurrent exchange of data, either in the form of request/responses for HTTP/2 or in the form of messages for Websocket.

    +

    A Gun connection is an Erlang process that manages a socket to a remote endpoint. This Gun connection is owned by a user process that is called the owner of the connection, and is managed by the supervision tree of the gun application.

    +

    Any process can communicate with the Gun connection by calling functions from the module gun. All functions perform their respective operations asynchronously. The Gun connection will send Erlang messages to the calling process whenever needed.

    +

    When the remote endpoint closes the connection, Gun attempts to reconnect automatically.

    +

    Opening a new connection

    +

    The gun:open/2,3 function must be used to open a connection.

    +
    Opening a connection to example.org on port 443
    +
    +
    {ok, ConnPid} = gun:open("example.org", 443).
    +
    +

    If the port given is 443, Gun will attempt to connect using TLS. The protocol will be selected automatically using the ALPN extension for TLS. By default Gun supports HTTP/2 and HTTP/1.1 when connecting using TLS.

    +

    For any other port, Gun will attempt to connect using plain TCP and will use the HTTP/1.1 protocol.

    +

    The transport and protocol used can be overriden via options. The manual documents all available options.

    +

    Options can be provided as a third argument, and take the form of a map.

    +
    Opening a TLS connection to example.org on port 8443
    +
    +
    {ok, ConnPid} = gun:open("example.org", 8443, #{transport => tls}).
    +
    +

    When using TLS you may want to tweak the configuration for the ssl application, in particular the session_lifetime and session_cache_client_max to limit the amount of memory used for the TLS sessions cache.

    +

    Waiting for the connection to be established

    +

    When Gun successfully connects to the server, it sends a gun_up message with the protocol that has been selected for the connection.

    +

    Gun provides the functions gun:await_up/1,2,3 that wait for the gun_up message. They can optionally take a monitor reference and/or timeout value. If no monitor is provided, one will be created for the duration of the function call.

    +
    Synchronous opening of a connection
    +
    +
    {ok, ConnPid} = gun:open("example.org", 443),
    +{ok, Protocol} = gun:await_up(ConnPid).
    +
    +

    Handling connection loss

    +

    When the connection is lost, Gun will send a gun_down message indicating the current protocol, the reason the connection was lost and two lists of stream references.

    +

    The first list indicates open streams that may have been processed by the server. The second list indicates open streams that the server did not process.

    +

    Monitoring the connection process

    +

    Because software errors are unavoidable, it is important to detect when the Gun process crashes. It is also important to detect when it exits normally. Erlang provides two ways to do that: links and monitors.

    +

    Gun leaves you the choice as to which one will be used. However, if you use the gun:await/2,3 or gun:await_body/2,3 functions, a monitor may be used for you to avoid getting stuck waiting for a message that will never come.

    +

    If you choose to monitor yourself you can do it on a permanent basis rather than on every message you will receive, saving resources. Indeed, the gun:await/3,4 and gun:await_body/3,4 functions both accept a monitor argument if you have one already.

    +
    Monitoring the connection process
    +
    +
    {ok, ConnPid} = gun:open("example.org", 443).
    +MRef = monitor(process, ConnPid).
    +
    +

    This monitor reference can be kept and used until the connection process exits.

    +
    Handling `DOWN` messages
    +
    +
    receive
    +    %% Receive Gun messages here...
    +    {'DOWN', Mref, process, ConnPid, Reason} ->
    +        error_logger:error_msg("Oops!"),
    +        exit(Reason)
    +end.
    +
    +

    What to do when you receive a DOWN message is entirely up to you.

    +

    Closing the connection abruptly

    +

    The connection can be stopped abruptly at any time by calling the gun:close/1 function.

    +
    Immediate closing of the connection
    +
    +
    gun:close(ConnPid).
    +
    +

    The process is stopped immediately without having a chance to perform the protocol's closing handshake, if any.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + +

    + Gun + 2.0 + + User Guide +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/guide/gun.sty b/docs/en/gun/2.0/guide/gun.sty new file mode 100644 index 00000000..d5e0d3be --- /dev/null +++ b/docs/en/gun/2.0/guide/gun.sty @@ -0,0 +1,8 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{asciidoc-dblatex}[2012/10/24 AsciiDoc DocBook Style] + +%% Just use the original package and pass the options. +\RequirePackageWithOptions{docbook} + +%% Define an alias for make snippets to be compatible with source-highlighter. +\lstalias{makefile}{make} diff --git a/docs/en/gun/2.0/guide/http.asciidoc b/docs/en/gun/2.0/guide/http.asciidoc new file mode 100644 index 00000000..51cb994f --- /dev/null +++ b/docs/en/gun/2.0/guide/http.asciidoc @@ -0,0 +1,387 @@ +[[http]] +== HTTP + +This chapter describes how to use the Gun client for +communicating with an HTTP/1.1 or HTTP/2 server. + +=== Streams + +Every time a request is initiated, Gun creates a _stream_. +A _stream reference_ uniquely identifies a set of request and +response and must be used to perform additional operations +with a stream or to identify its messages. + +Stream references use the Erlang _reference_ data type and +are therefore unique. + +Streams can be canceled at any time. This will stop any further +messages from being sent to the calling process. Depending on +its capabilities, the server will also be instructed to cancel +the request. + +Canceling a stream may result in Gun dropping the connection +temporarily, to avoid uploading or downloading data that will +not be used. + +.Cancelling a stream +[source,erlang] +---- +gun:cancel(ConnPid, StreamRef). +---- + +=== Sending requests + +Gun provides many convenient functions for performing common +operations, like GET, POST or DELETE. It also provides a +general purpose function in case you need other methods. + +The availability of these methods on the server can vary +depending on the software used but also on a per-resource +basis. + +Gun will automatically set a few headers depending on the +method used. For all methods however it will set the host +header if it has not been provided in the request arguments. + +This section focuses on the act of sending a request. The +handling of responses will be explained further on. + +==== GET and HEAD + +Use `gun:get/2,3,4` to request a resource. + +.GET "/organizations/ninenines" +[source,erlang] +---- +StreamRef = gun:get(ConnPid, "/organizations/ninenines"). +---- + +.GET "/organizations/ninenines" with custom headers +[source,erlang] +---- +StreamRef = gun:get(ConnPid, "/organizations/ninenines", [ + {<<"accept">>, "application/json"}, + {<<"user-agent">>, "revolver/1.0"} +]). +---- + +Note that the list of headers has the field name as a binary. +The field value is iodata, which is either a binary or an +iolist. + +Use `gun:head/2,3,4` if you don't need the response body. + +.HEAD "/organizations/ninenines" +[source,erlang] +---- +StreamRef = gun:head(ConnPid, "/organizations/ninenines"). +---- + +.HEAD "/organizations/ninenines" with custom headers +[source,erlang] +---- +StreamRef = gun:head(ConnPid, "/organizations/ninenines", [ + {<<"accept">>, "application/json"}, + {<<"user-agent">>, "revolver/1.0"} +]). +---- + +It is not possible to send a request body with a GET or HEAD +request. + +==== POST, PUT and PATCH + +HTTP defines three methods to create or update a resource. + +POST is generally used when the resource identifier (URI) isn't known +in advance when creating a resource. POST can also be used to +replace an existing resource, although PUT is more appropriate +in that situation. + +PUT creates or replaces a resource identified by the URI. + +PATCH provides instructions on how to modify the resource. + +Both POST and PUT send the entire resource representation in their +request body. The PATCH method can be used when this is not +desirable. The request body of a PATCH method may be a partial +representation or a list of instructions on how to update the +resource. + +The functions `gun:post/4,5`, `gun:put/4,5` and `gun:patch/4,5` +take a body as their fourth argument. These functions do +not require any body-specific header to be set, although +it is always recommended to set the content-type header. +Gun will set the other headers automatically. + +In this and the following examples in this section, `gun:post` +can be replaced by `gun:put` or `gun:patch` for performing +a PUT or PATCH request, respectively. + +.POST "/organizations/ninenines" +[source,erlang] +---- +Body = "{\"msg\": \"Hello world!\"}", +StreamRef = gun:post(ConnPid, "/organizations/ninenines", [ + {<<"content-type">>, "application/json"} +], Body). +---- + +The functions `gun:post/3,4`, `gun:put/3,4` and `gun:patch/3,4` +do not take a body in their arguments: the body must be +provided later on using the `gun:data/4` function. + +It is recommended to send the content-length header if you +know it in advance, although this is not required. If it +is not set, HTTP/1.1 will use the chunked transfer-encoding, +and HTTP/2 will continue normally as it is chunked by design. + +.POST "/organizations/ninenines" with delayed body +[source,erlang] +---- +Body = "{\"msg\": \"Hello world!\"}", +StreamRef = gun:post(ConnPid, "/organizations/ninenines", [ + {<<"content-length">>, integer_to_binary(length(Body))}, + {<<"content-type">>, "application/json"} +]), +gun:data(ConnPid, StreamRef, fin, Body). +---- + +The atom `fin` indicates this is the last chunk of data to +be sent. You can call the `gun:data/4` function as many +times as needed until you have sent the entire body. The +last call must use `fin` and all the previous calls must +use `nofin`. The last chunk may be empty. + +.Streaming the request body +[source,erlang] +---- +sendfile(ConnPid, StreamRef, Filepath) -> + {ok, IoDevice} = file:open(Filepath, [read, binary, raw]), + do_sendfile(ConnPid, StreamRef, IoDevice). + +do_sendfile(ConnPid, StreamRef, IoDevice) -> + case file:read(IoDevice, 8000) of + eof -> + gun:data(ConnPid, StreamRef, fin, <<>>), + file:close(IoDevice); + {ok, Bin} -> + gun:data(ConnPid, StreamRef, nofin, Bin), + do_sendfile(ConnPid, StreamRef, IoDevice) + end. +---- + +==== DELETE + +Use `gun:delete/2,3,4` to delete a resource. + +.DELETE "/organizations/ninenines" +[source,erlang] +---- +StreamRef = gun:delete(ConnPid, "/organizations/ninenines"). +---- + +.DELETE "/organizations/ninenines" with custom headers +[source,erlang] +---- +StreamRef = gun:delete(ConnPid, "/organizations/ninenines", [ + {<<"user-agent">>, "revolver/1.0"} +]). +---- + +==== OPTIONS + +Use `gun:options/2,3` to request information about a resource. + +.OPTIONS "/organizations/ninenines" +[source,erlang] +---- +StreamRef = gun:options(ConnPid, "/organizations/ninenines"). +---- + +.OPTIONS "/organizations/ninenines" with custom headers +[source,erlang] +---- +StreamRef = gun:options(ConnPid, "/organizations/ninenines", [ + {<<"user-agent">>, "revolver/1.0"} +]). +---- + +You can also use this function to request information about +the server itself. + +.OPTIONS "*" +[source,erlang] +---- +StreamRef = gun:options(ConnPid, "*"). +---- + +==== Requests with an arbitrary method + +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 + +All data received from the server is sent to the calling +process as a message. First a `gun_response` message is sent, +followed by zero or more `gun_data` messages. If something goes wrong, +a `gun_error` message is sent instead. + +The response message will inform you whether there will be +data messages following. If it contains `fin` there will be +no data messages. If it contains `nofin` then one or more data +messages will follow. + +When using HTTP/2 this value is sent with the frame and simply +passed on in the message. When using HTTP/1.1 however Gun must +guess whether data will follow by looking at the response headers. + +You can receive messages directly, or you can use the _await_ +functions to let Gun receive them for you. + +.Receiving a response using receive +[source,erlang] +---- +print_body(ConnPid, MRef) -> + StreamRef = gun:get(ConnPid, "/"), + receive + {gun_response, ConnPid, StreamRef, fin, Status, Headers} -> + no_data; + {gun_response, ConnPid, StreamRef, nofin, Status, Headers} -> + receive_data(ConnPid, MRef, StreamRef); + {'DOWN', MRef, process, ConnPid, Reason} -> + error_logger:error_msg("Oops!"), + exit(Reason) + after 1000 -> + exit(timeout) + end. + +receive_data(ConnPid, MRef, StreamRef) -> + receive + {gun_data, ConnPid, StreamRef, nofin, Data} -> + io:format("~s~n", [Data]), + receive_data(ConnPid, MRef, StreamRef); + {gun_data, ConnPid, StreamRef, fin, Data} -> + io:format("~s~n", [Data]); + {'DOWN', MRef, process, ConnPid, Reason} -> + error_logger:error_msg("Oops!"), + exit(Reason) + after 1000 -> + exit(timeout) + end. +---- + +While it may seem verbose, using messages like this has the +advantage of never locking your process, allowing you to +easily debug your code. It also allows you to start more than +one connection and concurrently perform queries on all of them +at the same time. + +You can also use Gun in a synchronous manner by using the _await_ +functions. + +The `gun:await/2,3,4` function will wait until it receives +a response to, a pushed resource related to, or data from +the given stream. + +When calling `gun:await/2,3` and not passing a monitor +reference, one is automatically created for you for the +duration of the call. + +The `gun:await_body/2,3,4` works similarly, but returns the +body received. Both functions can be combined to receive the +response and its body sequentially. + +.Receiving a response using await +[source,erlang] +---- +StreamRef = gun:get(ConnPid, "/"), +case gun:await(ConnPid, StreamRef) of + {response, fin, Status, Headers} -> + no_data; + {response, nofin, Status, Headers} -> + {ok, Body} = gun:await_body(ConnPid, StreamRef), + io:format("~s~n", [Body]) +end. +---- + +=== Handling streams pushed by the server + +The HTTP/2 protocol allows the server to push more than one +resource for every request. It will start sending those +extra resources before it starts sending the response itself, +so Gun will send you `gun_push` messages before `gun_response` +when that happens. + +You can safely choose to ignore `gun_push` messages, or +you can handle them. If you do, you can either receive the +messages directly or use _await_ functions. + +The `gun_push` message contains both the new stream reference +and the stream reference of the original request. + +.Receiving a pushed response using receive +[source,erlang] +---- +receive + {gun_push, ConnPid, OriginalStreamRef, PushedStreamRef, + Method, Host, Path, Headers} -> + enjoy() +end. +---- + +If you use the `gun:await/2,3,4` function, however, Gun +will use the original reference to identify the message but +will return a tuple that doesn't contain it. + +.Receiving a pushed response using await +[source,erlang] +---- +{push, PushedStreamRef, Method, URI, Headers} + = gun:await(ConnPid, OriginalStreamRef). +---- + +The `PushedStreamRef` variable can then be used with `gun:await/2,3,4` +and `gun:await_body/2,3,4`. + +=== Flushing unwanted messages + +Gun provides the function `gun:flush/1` to quickly get rid +of unwanted messages sitting in the process mailbox. You +can use it to get rid of all messages related to a connection, +or just the messages related to a stream. + +.Flush all messages from a Gun connection +[source,erlang] +---- +gun:flush(ConnPid). +---- + +.Flush all messages from a specific stream +[source,erlang] +---- +gun:flush(StreamRef). +---- + +=== Redirecting responses to a different process + +Gun allows you to specify which process will handle responses +to a request via the `reply_to` request option. + +.GET "/organizations/ninenines" to a different process +[source,erlang] +---- +StreamRef = gun:get(ConnPid, "/organizations/ninenines", [], + #{reply_to => Pid}). +---- diff --git a/docs/en/gun/2.0/guide/http/index.html b/docs/en/gun/2.0/guide/http/index.html new file mode 100644 index 00000000..47b346ac --- /dev/null +++ b/docs/en/gun/2.0/guide/http/index.html @@ -0,0 +1,451 @@ + + + + + + + + + + Nine Nines: HTTP + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    HTTP

    + +

    This chapter describes how to use the Gun client for communicating with an HTTP/1.1 or HTTP/2 server.

    +

    Streams

    +

    Every time a request is initiated, Gun creates a stream. A stream reference uniquely identifies a set of request and response and must be used to perform additional operations with a stream or to identify its messages.

    +

    Stream references use the Erlang reference data type and are therefore unique.

    +

    Streams can be canceled at any time. This will stop any further messages from being sent to the calling process. Depending on its capabilities, the server will also be instructed to cancel the request.

    +

    Canceling a stream may result in Gun dropping the connection temporarily, to avoid uploading or downloading data that will not be used.

    +
    Cancelling a stream
    +
    +
    gun:cancel(ConnPid, StreamRef).
    +
    +

    Sending requests

    +

    Gun provides many convenient functions for performing common operations, like GET, POST or DELETE. It also provides a general purpose function in case you need other methods.

    +

    The availability of these methods on the server can vary depending on the software used but also on a per-resource basis.

    +

    Gun will automatically set a few headers depending on the method used. For all methods however it will set the host header if it has not been provided in the request arguments.

    +

    This section focuses on the act of sending a request. The handling of responses will be explained further on.

    +

    GET and HEAD

    +

    Use gun:get/2,3,4 to request a resource.

    +
    GET "/organizations/ninenines"
    +
    +
    StreamRef = gun:get(ConnPid, "/organizations/ninenines").
    +
    +
    GET "/organizations/ninenines" with custom headers
    +
    +
    StreamRef = gun:get(ConnPid, "/organizations/ninenines", [
    +    {<<"accept">>, "application/json"},
    +    {<<"user-agent">>, "revolver/1.0"}
    +]).
    +
    +

    Note that the list of headers has the field name as a binary. The field value is iodata, which is either a binary or an iolist.

    +

    Use gun:head/2,3,4 if you don't need the response body.

    +
    HEAD "/organizations/ninenines"
    +
    +
    StreamRef = gun:head(ConnPid, "/organizations/ninenines").
    +
    +
    HEAD "/organizations/ninenines" with custom headers
    +
    +
    StreamRef = gun:head(ConnPid, "/organizations/ninenines", [
    +    {<<"accept">>, "application/json"},
    +    {<<"user-agent">>, "revolver/1.0"}
    +]).
    +
    +

    It is not possible to send a request body with a GET or HEAD request.

    +

    POST, PUT and PATCH

    +

    HTTP defines three methods to create or update a resource.

    +

    POST is generally used when the resource identifier (URI) isn't known in advance when creating a resource. POST can also be used to replace an existing resource, although PUT is more appropriate in that situation.

    +

    PUT creates or replaces a resource identified by the URI.

    +

    PATCH provides instructions on how to modify the resource.

    +

    Both POST and PUT send the entire resource representation in their request body. The PATCH method can be used when this is not desirable. The request body of a PATCH method may be a partial representation or a list of instructions on how to update the resource.

    +

    The functions gun:post/4,5, gun:put/4,5 and gun:patch/4,5 take a body as their fourth argument. These functions do not require any body-specific header to be set, although it is always recommended to set the content-type header. Gun will set the other headers automatically.

    +

    In this and the following examples in this section, gun:post can be replaced by gun:put or gun:patch for performing a PUT or PATCH request, respectively.

    +
    POST "/organizations/ninenines"
    +
    +
    Body = "{\"msg\": \"Hello world!\"}",
    +StreamRef = gun:post(ConnPid, "/organizations/ninenines", [
    +    {<<"content-type">>, "application/json"}
    +], Body).
    +
    +

    The functions gun:post/3,4, gun:put/3,4 and gun:patch/3,4 do not take a body in their arguments: the body must be provided later on using the gun:data/4 function.

    +

    It is recommended to send the content-length header if you know it in advance, although this is not required. If it is not set, HTTP/1.1 will use the chunked transfer-encoding, and HTTP/2 will continue normally as it is chunked by design.

    +
    POST "/organizations/ninenines" with delayed body
    +
    +
    Body = "{\"msg\": \"Hello world!\"}",
    +StreamRef = gun:post(ConnPid, "/organizations/ninenines", [
    +    {<<"content-length">>, integer_to_binary(length(Body))},
    +    {<<"content-type">>, "application/json"}
    +]),
    +gun:data(ConnPid, StreamRef, fin, Body).
    +
    +

    The atom fin indicates this is the last chunk of data to be sent. You can call the gun:data/4 function as many times as needed until you have sent the entire body. The last call must use fin and all the previous calls must use nofin. The last chunk may be empty.

    +
    Streaming the request body
    +
    +
    sendfile(ConnPid, StreamRef, Filepath) ->
    +    {ok, IoDevice} = file:open(Filepath, [read, binary, raw]),
    +    do_sendfile(ConnPid, StreamRef, IoDevice).
    +
    +do_sendfile(ConnPid, StreamRef, IoDevice) ->
    +    case file:read(IoDevice, 8000) of
    +        eof ->
    +            gun:data(ConnPid, StreamRef, fin, <<>>),
    +            file:close(IoDevice);
    +        {ok, Bin} ->
    +            gun:data(ConnPid, StreamRef, nofin, Bin),
    +            do_sendfile(ConnPid, StreamRef, IoDevice)
    +    end.
    +
    +

    DELETE

    +

    Use gun:delete/2,3,4 to delete a resource.

    +
    DELETE "/organizations/ninenines"
    +
    +
    StreamRef = gun:delete(ConnPid, "/organizations/ninenines").
    +
    +
    DELETE "/organizations/ninenines" with custom headers
    +
    +
    StreamRef = gun:delete(ConnPid, "/organizations/ninenines", [
    +    {<<"user-agent">>, "revolver/1.0"}
    +]).
    +
    +

    OPTIONS

    +

    Use gun:options/2,3 to request information about a resource.

    +
    OPTIONS "/organizations/ninenines"
    +
    +
    StreamRef = gun:options(ConnPid, "/organizations/ninenines").
    +
    +
    OPTIONS "/organizations/ninenines" with custom headers
    +
    +
    StreamRef = gun:options(ConnPid, "/organizations/ninenines", [
    +    {<<"user-agent">>, "revolver/1.0"}
    +]).
    +
    +

    You can also use this function to request information about the server itself.

    +
    OPTIONS "*"
    +
    +
    StreamRef = gun:options(ConnPid, "*").
    +
    +

    Requests with an arbitrary method

    +

    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
    +
    +
    gun:request(ConnPid, "TRACE", "/", [
    +    {<<"max-forwards">>, "30"}
    +], <<>>).
    +
    +

    Processing responses

    +

    All data received from the server is sent to the calling process as a message. First a gun_response message is sent, followed by zero or more gun_data messages. If something goes wrong, a gun_error message is sent instead.

    +

    The response message will inform you whether there will be data messages following. If it contains fin there will be no data messages. If it contains nofin then one or more data messages will follow.

    +

    When using HTTP/2 this value is sent with the frame and simply passed on in the message. When using HTTP/1.1 however Gun must guess whether data will follow by looking at the response headers.

    +

    You can receive messages directly, or you can use the await functions to let Gun receive them for you.

    +
    Receiving a response using receive
    +
    +
    print_body(ConnPid, MRef) ->
    +    StreamRef = gun:get(ConnPid, "/"),
    +    receive
    +        {gun_response, ConnPid, StreamRef, fin, Status, Headers} ->
    +            no_data;
    +        {gun_response, ConnPid, StreamRef, nofin, Status, Headers} ->
    +            receive_data(ConnPid, MRef, StreamRef);
    +        {'DOWN', MRef, process, ConnPid, Reason} ->
    +            error_logger:error_msg("Oops!"),
    +            exit(Reason)
    +    after 1000 ->
    +        exit(timeout)
    +    end.
    +
    +receive_data(ConnPid, MRef, StreamRef) ->
    +    receive
    +        {gun_data, ConnPid, StreamRef, nofin, Data} ->
    +            io:format("~s~n", [Data]),
    +            receive_data(ConnPid, MRef, StreamRef);
    +        {gun_data, ConnPid, StreamRef, fin, Data} ->
    +            io:format("~s~n", [Data]);
    +        {'DOWN', MRef, process, ConnPid, Reason} ->
    +            error_logger:error_msg("Oops!"),
    +            exit(Reason)
    +    after 1000 ->
    +        exit(timeout)
    +    end.
    +
    +

    While it may seem verbose, using messages like this has the advantage of never locking your process, allowing you to easily debug your code. It also allows you to start more than one connection and concurrently perform queries on all of them at the same time.

    +

    You can also use Gun in a synchronous manner by using the await functions.

    +

    The gun:await/2,3,4 function will wait until it receives a response to, a pushed resource related to, or data from the given stream.

    +

    When calling gun:await/2,3 and not passing a monitor reference, one is automatically created for you for the duration of the call.

    +

    The gun:await_body/2,3,4 works similarly, but returns the body received. Both functions can be combined to receive the response and its body sequentially.

    +
    Receiving a response using await
    +
    +
    StreamRef = gun:get(ConnPid, "/"),
    +case gun:await(ConnPid, StreamRef) of
    +    {response, fin, Status, Headers} ->
    +        no_data;
    +    {response, nofin, Status, Headers} ->
    +        {ok, Body} = gun:await_body(ConnPid, StreamRef),
    +        io:format("~s~n", [Body])
    +end.
    +
    +

    Handling streams pushed by the server

    +

    The HTTP/2 protocol allows the server to push more than one resource for every request. It will start sending those extra resources before it starts sending the response itself, so Gun will send you gun_push messages before gun_response when that happens.

    +

    You can safely choose to ignore gun_push messages, or you can handle them. If you do, you can either receive the messages directly or use await functions.

    +

    The gun_push message contains both the new stream reference and the stream reference of the original request.

    +
    Receiving a pushed response using receive
    +
    +
    receive
    +    {gun_push, ConnPid, OriginalStreamRef, PushedStreamRef,
    +            Method, Host, Path, Headers} ->
    +        enjoy()
    +end.
    +
    +

    If you use the gun:await/2,3,4 function, however, Gun will use the original reference to identify the message but will return a tuple that doesn't contain it.

    +
    Receiving a pushed response using await
    +
    +
    {push, PushedStreamRef, Method, URI, Headers}
    +    = gun:await(ConnPid, OriginalStreamRef).
    +
    +

    The PushedStreamRef variable can then be used with gun:await/2,3,4 and gun:await_body/2,3,4.

    +

    Flushing unwanted messages

    +

    Gun provides the function gun:flush/1 to quickly get rid of unwanted messages sitting in the process mailbox. You can use it to get rid of all messages related to a connection, or just the messages related to a stream.

    +
    Flush all messages from a Gun connection
    +
    +
    gun:flush(ConnPid).
    +
    +
    Flush all messages from a specific stream
    +
    +
    gun:flush(StreamRef).
    +
    +

    Redirecting responses to a different process

    +

    Gun allows you to specify which process will handle responses to a request via the reply_to request option.

    +
    GET "/organizations/ninenines" to a different process
    +
    +
    StreamRef = gun:get(ConnPid, "/organizations/ninenines", [],
    +    #{reply_to => Pid}).
    +
    + + + + + + + + + + + + + + + + +
    + +
    + + +

    + Gun + 2.0 + + User Guide +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/guide/index.html b/docs/en/gun/2.0/guide/index.html new file mode 100644 index 00000000..fd0ce5f9 --- /dev/null +++ b/docs/en/gun/2.0/guide/index.html @@ -0,0 +1,179 @@ + + + + + + + + + + Nine Nines: Gun User Guide + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    + + +

    + Gun + 2.0 + + User Guide +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/guide/introduction.asciidoc b/docs/en/gun/2.0/guide/introduction.asciidoc new file mode 100644 index 00000000..dfbe1e30 --- /dev/null +++ b/docs/en/gun/2.0/guide/introduction.asciidoc @@ -0,0 +1,55 @@ +[[introduction]] +== Introduction + +Gun is an HTTP client for Erlang/OTP. + +Gun supports the HTTP/2, HTTP/1.1 and Websocket protocols. + +=== Prerequisites + +Knowledge of Erlang, but also of the HTTP/1.1, HTTP/2 and Websocket +protocols is required in order to read this guide. + +=== Supported platforms + +Gun is tested and supported on Linux, FreeBSD, Windows and OSX. + +Gun is developed for Erlang/OTP 20.0 and newer. + +Note that Gun will not work on the Windows build of Erlang/OTP 20.3 +due to a bug in Erlang/OTP's stdlib application. The ticket number +for this bug is OTP-13995 and it was fixed in the patch release +OTP-20.3.2. Replacing the `gen_statem.beam` file on an 20.3 +installation is enough to fix the issue. + +=== License + +Gun uses the ISC License. + +---- +Copyright (c) 2013-2019, Loïc Hoguin + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +---- + +=== Versioning + +Gun uses http://semver.org/[Semantic Versioning 2.0.0]. + +=== Conventions + +In the HTTP protocol, the method name is case sensitive. All standard +method names are uppercase. + +Header names are case insensitive. Gun converts all the header names +to lowercase, including request headers provided by your application. diff --git a/docs/en/gun/2.0/guide/introduction/index.html b/docs/en/gun/2.0/guide/introduction/index.html new file mode 100644 index 00000000..51ffc006 --- /dev/null +++ b/docs/en/gun/2.0/guide/introduction/index.html @@ -0,0 +1,203 @@ + + + + + + + + + + Nine Nines: Introduction + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    Introduction

    + +

    Gun is an HTTP client for Erlang/OTP.

    +

    Gun supports the HTTP/2, HTTP/1.1 and Websocket protocols.

    +

    Prerequisites

    +

    Knowledge of Erlang, but also of the HTTP/1.1, HTTP/2 and Websocket protocols is required in order to read this guide.

    +

    Supported platforms

    +

    Gun is tested and supported on Linux, FreeBSD, Windows and OSX.

    +

    Gun is developed for Erlang/OTP 20.0 and newer.

    +

    Note that Gun will not work on the Windows build of Erlang/OTP 20.3 due to a bug in Erlang/OTP's stdlib application. The ticket number for this bug is OTP-13995 and it was fixed in the patch release OTP-20.3.2. Replacing the gen_statem.beam file on an 20.3 installation is enough to fix the issue.

    +

    License

    +

    Gun uses the ISC License.

    +
    Copyright (c) 2013-2019, Loïc Hoguin <essen@ninenines.eu>
    +
    +Permission to use, copy, modify, and/or distribute this software for any
    +purpose with or without fee is hereby granted, provided that the above
    +copyright notice and this permission notice appear in all copies.
    +
    +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    +

    Versioning

    +

    Gun uses Semantic Versioning 2.0.0.

    +

    Conventions

    +

    In the HTTP protocol, the method name is case sensitive. All standard method names are uppercase.

    +

    Header names are case insensitive. Gun converts all the header names to lowercase, including request headers provided by your application.

    + + + + + + + + + + + + + + + + +
    + +
    + + +

    + Gun + 2.0 + + User Guide +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/guide/migrating_from_1.0.asciidoc b/docs/en/gun/2.0/guide/migrating_from_1.0.asciidoc new file mode 100644 index 00000000..8057683c --- /dev/null +++ b/docs/en/gun/2.0/guide/migrating_from_1.0.asciidoc @@ -0,0 +1,21 @@ +[appendix] +== Migrating from Gun 1.0 to 1.1 + +Gun 1.1 updates the Cowlib dependency to 2.5.1 and fixes a +few problems with experimental features. + +== Features added + +* Update Cowlib to 2.5.1 + +=== Bugs fixed + +* A bug in the experimental `gun_sse_h` where lone id lines + were not propagated has been fixed by updating the Cowlib + dependency. + +* The status code was incorrectly given to the experimental + content handlers as a binary. It has been fixed an an + integer is now given as was intended. + +* A number of Dialyzer warnings have been fixed. diff --git a/docs/en/gun/2.0/guide/migrating_from_1.0/index.html b/docs/en/gun/2.0/guide/migrating_from_1.0/index.html new file mode 100644 index 00000000..d6705cf3 --- /dev/null +++ b/docs/en/gun/2.0/guide/migrating_from_1.0/index.html @@ -0,0 +1,188 @@ + + + + + + + + + + Nine Nines: Migrating from Gun 1.0 to 1.1 + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    Migrating from Gun 1.0 to 1.1

    + +

    Gun 1.1 updates the Cowlib dependency to 2.5.1 and fixes a few problems with experimental features.

    +

    Features added

    +
    • Update Cowlib to 2.5.1 +
    • +
    +

    Bugs fixed

    +
    • A bug in the experimental gun_sse_h where lone id lines were not propagated has been fixed by updating the Cowlib dependency. +
    • +
    • The status code was incorrectly given to the experimental content handlers as a binary. It has been fixed an an integer is now given as was intended. +
    • +
    • A number of Dialyzer warnings have been fixed. +
    • +
    + + + + + + + + + + + + + + + + +
    + +
    + + +

    + Gun + 2.0 + + User Guide +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/guide/migrating_from_1.1.asciidoc b/docs/en/gun/2.0/guide/migrating_from_1.1.asciidoc new file mode 100644 index 00000000..bc2097f9 --- /dev/null +++ b/docs/en/gun/2.0/guide/migrating_from_1.1.asciidoc @@ -0,0 +1,28 @@ +[appendix] +== Migrating from Gun 1.1 to 1.2 + +Gun 1.2 adds support for the CONNECT request over HTTP/1.1 +connections. + +== Features added + +* CONNECT requests can now be issued on HTTP/1.1 connections. + The tunneled connection can use any of the protocols Gun + supports: HTTP/1.1, HTTP/2 and Websocket over both TCP and + TLS transports. Note that Gun currently does not support + tunneling a TLS connection over a TLS connection due to + limitations in Erlang/OTP. + +* Gun supports sending multiple CONNECT requests, allowing + the tunnel to the origin server to go through multiple + proxies. + +* Gun supports sending CONNECT requests with authorization + credentials using the Basic authentication mechanism. + +* Update Cowlib to 2.6.0 + +== Functions added + +* The functions `gun:connect/2,3,4` have been added. They can + be used to initiate CONNECT requests on HTTP/1.1 connections. diff --git a/docs/en/gun/2.0/guide/migrating_from_1.1/index.html b/docs/en/gun/2.0/guide/migrating_from_1.1/index.html new file mode 100644 index 00000000..5deb48c4 --- /dev/null +++ b/docs/en/gun/2.0/guide/migrating_from_1.1/index.html @@ -0,0 +1,194 @@ + + + + + + + + + + Nine Nines: Migrating from Gun 1.1 to 1.2 + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    Migrating from Gun 1.1 to 1.2

    + +

    Gun 1.2 adds support for the CONNECT request over HTTP/1.1 connections.

    +

    Features added

    +
    • CONNECT requests can now be issued on HTTP/1.1 connections. The tunneled connection can use any of the protocols Gun supports: HTTP/1.1, HTTP/2 and Websocket over both TCP and TLS transports. Note that Gun currently does not support tunneling a TLS connection over a TLS connection due to limitations in Erlang/OTP. +
    • +
    • Gun supports sending multiple CONNECT requests, allowing the tunnel to the origin server to go through multiple proxies. +
    • +
    • Gun supports sending CONNECT requests with authorization credentials using the Basic authentication mechanism. +
    • +
    • Update Cowlib to 2.6.0 +
    • +
    +

    Functions added

    +
    • The functions gun:connect/2,3,4 have been added. They can be used to initiate CONNECT requests on HTTP/1.1 connections. +
    • +
    + + + + + + + + + + + + + + + + +
    + +
    + + +

    + Gun + 2.0 + + User Guide +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/guide/migrating_from_1.2.asciidoc b/docs/en/gun/2.0/guide/migrating_from_1.2.asciidoc new file mode 100644 index 00000000..a870858e --- /dev/null +++ b/docs/en/gun/2.0/guide/migrating_from_1.2.asciidoc @@ -0,0 +1,39 @@ +[appendix] +== Migrating from Gun 1.2 to 1.3 + +Gun 1.3 improves the support for CONNECT requests +introduced in the previous version and documents +Websocket protocol negotiation. + +== Features added + +* The `protocols` CONNECT destination option has been added + as a replacement for the now deprecated `protocol` option. + +* Add built-in support for Websocket protocol negotiation + through the Websocket option `protocols`. The interface + of the handler module currently remains undocumented and + must be set to `gun_ws_h`. + +* Add the h2specd HTTP/2 test suite from the h2spec project. + +=== Bugs fixed + +* Fix connecting to HTTP/2 over TLS origin servers via + HTTP/1.1 CONNECT proxies. + +* Do not send the HTTP/1.1 keepalive while waiting for + a response to a CONNECT request. + +* Do not crash on HTTP/2 HEADERS frames with the + PRIORITY flag set. + +* Do not crash on HTTP/2 HEADERS frames when the + END_HEADERS flag is not set. + +* Do not crash on unknown HTTP/2 frame types. + +* Reject HTTP/2 WINDOW_UPDATE frames when they would + cause the window to overflow. + +* Send a GOAWAY frame on closing the HTTP/2 connection. diff --git a/docs/en/gun/2.0/guide/migrating_from_1.2/index.html b/docs/en/gun/2.0/guide/migrating_from_1.2/index.html new file mode 100644 index 00000000..bb2d6436 --- /dev/null +++ b/docs/en/gun/2.0/guide/migrating_from_1.2/index.html @@ -0,0 +1,204 @@ + + + + + + + + + + Nine Nines: Migrating from Gun 1.2 to 1.3 + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    Migrating from Gun 1.2 to 1.3

    + +

    Gun 1.3 improves the support for CONNECT requests introduced in the previous version and documents Websocket protocol negotiation.

    +

    Features added

    +
    • The protocols CONNECT destination option has been added as a replacement for the now deprecated protocol option. +
    • +
    • Add built-in support for Websocket protocol negotiation through the Websocket option protocols. The interface of the handler module currently remains undocumented and must be set to gun_ws_h. +
    • +
    • Add the h2specd HTTP/2 test suite from the h2spec project. +
    • +
    +

    Bugs fixed

    +
    • Fix connecting to HTTP/2 over TLS origin servers via HTTP/1.1 CONNECT proxies. +
    • +
    • Do not send the HTTP/1.1 keepalive while waiting for a response to a CONNECT request. +
    • +
    • Do not crash on HTTP/2 HEADERS frames with the PRIORITY flag set. +
    • +
    • Do not crash on HTTP/2 HEADERS frames when the END_HEADERS flag is not set. +
    • +
    • Do not crash on unknown HTTP/2 frame types. +
    • +
    • Reject HTTP/2 WINDOW_UPDATE frames when they would cause the window to overflow. +
    • +
    • Send a GOAWAY frame on closing the HTTP/2 connection. +
    • +
    + + + + + + + + + + + + + + + + +
    + +
    + + +

    + Gun + 2.0 + + User Guide +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/guide/protocols.asciidoc b/docs/en/gun/2.0/guide/protocols.asciidoc new file mode 100644 index 00000000..d2529e38 --- /dev/null +++ b/docs/en/gun/2.0/guide/protocols.asciidoc @@ -0,0 +1,127 @@ +[[protocols]] +== Supported protocols + +This chapter describes the protocols supported and the +operations available to them. + +=== HTTP/1.1 + +HTTP/1.1 is a text request-response protocol. The client +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: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 +before the `gun_response` message. + +Gun will send a `gun_response` message for every response +received, followed by zero or more `gun_data` messages for +the response body, which is optionally terminated by a +`gun_trailers` message. If something goes wrong, a `gun_error` +will be sent instead. + +Gun provides convenience functions for dealing with messages. +The `gun:await/2,3,4` function waits for a response to the given +request, and the `gun:await_body/2,3,4` function for the +response body. The `gun:flush/1` function can be used to clear all +messages related to a request or a connection from the mailbox +of the calling process. + +The function `gun:cancel/2` can be used to silence the +response to a request previously sent if it is no longer +needed. When using HTTP/1.1 there is no multiplexing so +Gun will have to receive the response fully before any +other responses can be received. + +Finally, Gun can upgrade an HTTP/1.1 connection to Websocket. +It provides the `gun:ws_upgrade/2,3,4` function for that +purpose. A `gun_upgrade` message will be sent on success; +a `gun_response` message otherwise. + +=== HTTP/2 + +HTTP/2 is a binary protocol based on HTTP, compatible with +the HTTP semantics, that reduces the complexity of parsing +requests and responses, compresses the HTTP headers and +allows the server to push additional resources along with +the normal response to the original request. + +The HTTP/2 interface is very similar to HTTP/1.1, so this +section instead focuses on the differences in the interface +for the two protocols. + +Gun will send `gun_push` messages for every push received. +They will always be sent before the `gun_response` message. +They can be ignored safely if they are not needed, or they +can be canceled. + +The `gun:cancel/2` function will use the HTTP/2 stream +cancellation mechanism which allows Gun to inform the +server to stop sending a response for this particular +request, saving resources. + +It is not currently possible to upgrade an HTTP/2 connection +to Websocket. Support for this will be added in a future +release. + +=== Websocket + +Websocket is a binary protocol built on top of HTTP that +allows asynchronous concurrent communication between the +client and the server. A Websocket server can push data to +the client at any time. + +Websocket is only available as a connection upgrade over +an HTTP/1.1 connection. + +Once the Websocket connection is established, the only +operation available on this connection is sending Websocket +frames using `gun:ws_send/2`. + +Gun will send a `gun_ws` message for every frame received. + +=== Summary + +The two following tables summarize the supported operations +and the messages Gun sends depending on the connection's +current protocol. + +.Supported operations per protocol +[cols="<,3*^",options="header"] +|=== +| Operation | HTTP/1.1 | HTTP/2 | Websocket +| delete | yes | yes | no +| get | yes | yes | no +| head | yes | yes | no +| options | yes | yes | no +| patch | yes | yes | no +| post | yes | yes | no +| put | yes | yes | no +| request | yes | yes | no +| data | yes | yes | no +| await | yes | yes | no +| await_body | yes | yes | no +| flush | yes | yes | no +| cancel | yes | yes | no +| ws_upgrade | yes | no | no +| ws_send | no | no | yes +|=== + +.Messages sent per protocol +[cols="<,3*^",options="header"] +|=== +| Message | HTTP/1.1 | HTTP/2 | Websocket +| gun_push | no | yes | no +| gun_inform | yes | yes | no +| gun_response | yes | yes | no +| gun_data | yes | yes | no +| gun_trailers | yes | yes | no +| gun_error | yes | yes | yes +| gun_upgrade | yes | no | no +| gun_ws | no | no | yes +|=== diff --git a/docs/en/gun/2.0/guide/protocols/index.html b/docs/en/gun/2.0/guide/protocols/index.html new file mode 100644 index 00000000..aa9c08cb --- /dev/null +++ b/docs/en/gun/2.0/guide/protocols/index.html @@ -0,0 +1,330 @@ + + + + + + + + + + Nine Nines: Supported protocols + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    Supported protocols

    + +

    This chapter describes the protocols supported and the operations available to them.

    +

    HTTP/1.1

    +

    HTTP/1.1 is a text request-response protocol. The client 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: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 before the gun_response message.

    +

    Gun will send a gun_response message for every response received, followed by zero or more gun_data messages for the response body, which is optionally terminated by a gun_trailers message. If something goes wrong, a gun_error will be sent instead.

    +

    Gun provides convenience functions for dealing with messages. The gun:await/2,3,4 function waits for a response to the given request, and the gun:await_body/2,3,4 function for the response body. The gun:flush/1 function can be used to clear all messages related to a request or a connection from the mailbox of the calling process.

    +

    The function gun:cancel/2 can be used to silence the response to a request previously sent if it is no longer needed. When using HTTP/1.1 there is no multiplexing so Gun will have to receive the response fully before any other responses can be received.

    +

    Finally, Gun can upgrade an HTTP/1.1 connection to Websocket. It provides the gun:ws_upgrade/2,3,4 function for that purpose. A gun_upgrade message will be sent on success; a gun_response message otherwise.

    +

    HTTP/2

    +

    HTTP/2 is a binary protocol based on HTTP, compatible with the HTTP semantics, that reduces the complexity of parsing requests and responses, compresses the HTTP headers and allows the server to push additional resources along with the normal response to the original request.

    +

    The HTTP/2 interface is very similar to HTTP/1.1, so this section instead focuses on the differences in the interface for the two protocols.

    +

    Gun will send gun_push messages for every push received. They will always be sent before the gun_response message. They can be ignored safely if they are not needed, or they can be canceled.

    +

    The gun:cancel/2 function will use the HTTP/2 stream cancellation mechanism which allows Gun to inform the server to stop sending a response for this particular request, saving resources.

    +

    It is not currently possible to upgrade an HTTP/2 connection to Websocket. Support for this will be added in a future release.

    +

    Websocket

    +

    Websocket is a binary protocol built on top of HTTP that allows asynchronous concurrent communication between the client and the server. A Websocket server can push data to the client at any time.

    +

    Websocket is only available as a connection upgrade over an HTTP/1.1 connection.

    +

    Once the Websocket connection is established, the only operation available on this connection is sending Websocket frames using gun:ws_send/2.

    +

    Gun will send a gun_ws message for every frame received.

    +

    Summary

    +

    The two following tables summarize the supported operations and the messages Gun sends depending on the connection's current protocol.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Supported operations per protocol
    OperationHTTP/1.1HTTP/2Websocket
    deleteyesyesno
    getyesyesno
    headyesyesno
    optionsyesyesno
    patchyesyesno
    postyesyesno
    putyesyesno
    requestyesyesno
    datayesyesno
    awaityesyesno
    await_bodyyesyesno
    flushyesyesno
    cancelyesyesno
    ws_upgradeyesnono
    ws_sendnonoyes
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Messages sent per protocol
    MessageHTTP/1.1HTTP/2Websocket
    gun_pushnoyesno
    gun_informyesyesno
    gun_responseyesyesno
    gun_datayesyesno
    gun_trailersyesyesno
    gun_erroryesyesyes
    gun_upgradeyesnono
    gun_wsnonoyes
    + + + + + + + + + + + + + + + + +
    + +
    + + +

    + Gun + 2.0 + + User Guide +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/guide/start.asciidoc b/docs/en/gun/2.0/guide/start.asciidoc new file mode 100644 index 00000000..09720dca --- /dev/null +++ b/docs/en/gun/2.0/guide/start.asciidoc @@ -0,0 +1,43 @@ +[[start]] +== Starting and stopping + +This chapter describes how to start and stop the Gun application. + +=== Setting up + +Specify Gun as a dependency to your application in your favorite +build tool. + +With Erlang.mk this is done by adding `gun` to the `DEPS` variable +in your Makefile. + +.Adding Gun as an Erlang.mk dependency +[source,make] +---- +DEPS = gun +---- + +=== Starting + +Gun is an _OTP application_. It needs to be started before you can +use it. + +.Starting Gun in an Erlang shell +[source,erlang] +---- +1> application:ensure_all_started(gun). +{ok,[crypto,cowlib,asn1,public_key,ssl,gun]} +---- + +=== Stopping + +You can stop Gun using the `application:stop/1` function, however +only Gun will be stopped. This is the reverse of `application:start/1`. +The `application_ensure_all_started/1` function has no equivalent for +stopping all applications. + +.Stopping Gun +[source,erlang] +---- +application:stop(gun). +---- diff --git a/docs/en/gun/2.0/guide/start/index.html b/docs/en/gun/2.0/guide/start/index.html new file mode 100644 index 00000000..b1836e94 --- /dev/null +++ b/docs/en/gun/2.0/guide/start/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + Nine Nines: Starting and stopping + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    Starting and stopping

    + +

    This chapter describes how to start and stop the Gun application.

    +

    Setting up

    +

    Specify Gun as a dependency to your application in your favorite build tool.

    +

    With Erlang.mk this is done by adding gun to the DEPS variable in your Makefile.

    +
    Adding Gun as an Erlang.mk dependency
    +
    +
    DEPS = gun
    +
    +

    Starting

    +

    Gun is an OTP application. It needs to be started before you can use it.

    +
    Starting Gun in an Erlang shell
    +
    +
    1> application:ensure_all_started(gun).
    +{ok,[crypto,cowlib,asn1,public_key,ssl,gun]}
    +
    +

    Stopping

    +

    You can stop Gun using the application:stop/1 function, however only Gun will be stopped. This is the reverse of application:start/1. The application_ensure_all_started/1 function has no equivalent for stopping all applications.

    +
    Stopping Gun
    +
    +
    application:stop(gun).
    +
    + + + + + + + + + + + + + + + + +
    + +
    + + +

    + Gun + 2.0 + + User Guide +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/guide/websocket.asciidoc b/docs/en/gun/2.0/guide/websocket.asciidoc new file mode 100644 index 00000000..287b3f73 --- /dev/null +++ b/docs/en/gun/2.0/guide/websocket.asciidoc @@ -0,0 +1,124 @@ +[[websocket]] +== Websocket + +This chapter describes how to use the Gun client for +communicating with a Websocket server. + +// @todo recovering from connection failure, reconnecting to Websocket etc. + +=== HTTP upgrade + +Websocket is a protocol built on top of HTTP. To use Websocket, +you must first request for the connection to be upgraded. Only +HTTP/1.1 connections can be upgraded to Websocket, so you might +need to restrict the protocol to HTTP/1.1 if you are planning +to use Websocket over TLS. + +You must use the `gun:ws_upgrade/2,3,4` function to upgrade +to Websocket. This function can be called anytime after connection, +so you can send HTTP requests before upgrading to Websocket. + +.Upgrade to Websocket +[source,erlang] +---- +gun:ws_upgrade(ConnPid, "/websocket"). +---- + +Gun will set all the necessary headers for performing the +Websocket upgrade, but you can specify additional headers +if needed. For example you can authenticate. + +.Upgrade to Websocket using HTTP authentication +[source,erlang] +---- +gun:ws_upgrade(ConnPid, "/websocket", [ + {<<"authorization">>, "Basic dXNlcm5hbWU6cGFzc3dvcmQ="} +]). +---- + +You can pass the Websocket options as part of the `gun:open/2,3` +call when opening the connection, or using the `gun:ws_upgrade/4`. +The fourth argument is those same options. + +Gun can negotiate the protocol to be used for the Websocket +connection. The `protocols` option can be given with a list +of protocols accepted and the corresponding handler module. +Note that the interface for handler modules is currently +undocumented and must be set to `gun_ws_h`. + +.Upgrade to Websocket with protocol negotiation +[source,erlang] +---- +gun:ws_upgrade(ConnPid, "/websocket", [] + #{protocols => [{<<"xmpp">>, gun_ws_h}]}). +---- + +The upgrade will fail if the server cannot satisfy the +protocol negotiation. + +When the upgrade succeeds, a `gun_upgrade` message is sent. +If the server does not understand Websocket or refused the +upgrade, a `gun_response` message is sent. If Gun couldn't +perform the upgrade due to an error (for example attempting +to upgrade to Websocket on an HTTP/1.0 connection) then a +`gun_error` message is sent. + +When the server does not understand Websocket, it may send +a meaningful response which should be processed. In the +following example we however ignore it: + +[source,erlang] +---- +receive + {gun_upgrade, ConnPid, StreamRef, [<<"websocket">>], Headers} -> + upgrade_success(ConnPid, StreamRef); + {gun_response, ConnPid, _, _, Status, Headers} -> + exit({ws_upgrade_failed, Status, Headers}); + {gun_error, ConnPid, StreamRef, Reason} -> + exit({ws_upgrade_failed, Reason}) + %% More clauses here as needed. +after 1000 -> + exit(timeout) +end. +---- + +=== Sending data + +Once the Websocket upgrade has completed successfully, you no +longer have access to functions for performing requests. You +can only send and receive Websocket messages. + +Use `gun:ws_send/2` to send messages to the server. + +.Send a text frame +[source,erlang] +---- +gun:ws_send(ConnPid, {text, "Hello!"}). +---- + +.Send a text frame, a binary frame and then close the connection +[source,erlang] +---- +gun:ws_send(ConnPid, [ + {text, "Hello!"}, + {binary, BinaryValue}, + close +]). +---- + +Note that if you send a close frame, Gun will close the connection +cleanly but may attempt to reconnect afterwards depending on the +`retry` configuration. + +=== Receiving data + +Gun sends an Erlang message to the owner process for every +Websocket message it receives. + +[source,erlang] +---- +receive + {gun_ws, ConnPid, StreamRef, Frame} -> + handle_frame(ConnPid, StreamRef, Frame) +end. +---- diff --git a/docs/en/gun/2.0/guide/websocket/index.html b/docs/en/gun/2.0/guide/websocket/index.html new file mode 100644 index 00000000..88694744 --- /dev/null +++ b/docs/en/gun/2.0/guide/websocket/index.html @@ -0,0 +1,263 @@ + + + + + + + + + + Nine Nines: Websocket + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    Websocket

    + +

    This chapter describes how to use the Gun client for communicating with a Websocket server.

    + +

    HTTP upgrade

    +

    Websocket is a protocol built on top of HTTP. To use Websocket, you must first request for the connection to be upgraded. Only HTTP/1.1 connections can be upgraded to Websocket, so you might need to restrict the protocol to HTTP/1.1 if you are planning to use Websocket over TLS.

    +

    You must use the gun:ws_upgrade/2,3,4 function to upgrade to Websocket. This function can be called anytime after connection, so you can send HTTP requests before upgrading to Websocket.

    +
    Upgrade to Websocket
    +
    +
    gun:ws_upgrade(ConnPid, "/websocket").
    +
    +

    Gun will set all the necessary headers for performing the Websocket upgrade, but you can specify additional headers if needed. For example you can authenticate.

    +
    Upgrade to Websocket using HTTP authentication
    +
    +
    gun:ws_upgrade(ConnPid, "/websocket", [
    +    {<<"authorization">>, "Basic dXNlcm5hbWU6cGFzc3dvcmQ="}
    +]).
    +
    +

    You can pass the Websocket options as part of the gun:open/2,3 call when opening the connection, or using the gun:ws_upgrade/4. The fourth argument is those same options.

    +

    Gun can negotiate the protocol to be used for the Websocket connection. The protocols option can be given with a list of protocols accepted and the corresponding handler module. Note that the interface for handler modules is currently undocumented and must be set to gun_ws_h.

    +
    Upgrade to Websocket with protocol negotiation
    +
    +
    gun:ws_upgrade(ConnPid, "/websocket", []
    +    #{protocols => [{<<"xmpp">>, gun_ws_h}]}).
    +
    +

    The upgrade will fail if the server cannot satisfy the protocol negotiation.

    +

    When the upgrade succeeds, a gun_upgrade message is sent. If the server does not understand Websocket or refused the upgrade, a gun_response message is sent. If Gun couldn't perform the upgrade due to an error (for example attempting to upgrade to Websocket on an HTTP/1.0 connection) then a gun_error message is sent.

    +

    When the server does not understand Websocket, it may send a meaningful response which should be processed. In the following example we however ignore it:

    +
    +
    receive
    +    {gun_upgrade, ConnPid, StreamRef, [<<"websocket">>], Headers} ->
    +        upgrade_success(ConnPid, StreamRef);
    +    {gun_response, ConnPid, _, _, Status, Headers} ->
    +        exit({ws_upgrade_failed, Status, Headers});
    +    {gun_error, ConnPid, StreamRef, Reason} ->
    +        exit({ws_upgrade_failed, Reason})
    +    %% More clauses here as needed.
    +after 1000 ->
    +    exit(timeout)
    +end.
    +
    +

    Sending data

    +

    Once the Websocket upgrade has completed successfully, you no longer have access to functions for performing requests. You can only send and receive Websocket messages.

    +

    Use gun:ws_send/2 to send messages to the server.

    +
    Send a text frame
    +
    +
    gun:ws_send(ConnPid, {text, "Hello!"}).
    +
    +
    Send a text frame, a binary frame and then close the connection
    +
    +
    gun:ws_send(ConnPid, [
    +    {text, "Hello!"},
    +    {binary, BinaryValue},
    +    close
    +]).
    +
    +

    Note that if you send a close frame, Gun will close the connection cleanly but may attempt to reconnect afterwards depending on the retry configuration.

    +

    Receiving data

    +

    Gun sends an Erlang message to the owner process for every Websocket message it receives.

    +
    +
    receive
    +    {gun_ws, ConnPid, StreamRef, Frame} ->
    +        handle_frame(ConnPid, StreamRef, Frame)
    +end.
    +
    + + + + + + + + + + + + + + + + +
    + +
    + + +

    + Gun + 2.0 + + User Guide +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.await/index.html b/docs/en/gun/2.0/manual/gun.await/index.html new file mode 100644 index 00000000..2a51b063 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.await/index.html @@ -0,0 +1,255 @@ + + + + + + + + + + Nine Nines: gun:await(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:await(3)

    + +

    Name

    +

    gun:await - Wait for a response

    +

    Description

    +
    +
    await(ConnPid, StreamRef)
    +    -> await(ConnPid, StreamRef, 5000, MonitorRef)
    +
    +await(ConnPid, StreamRef, MonitorRef)
    +    -> await(ConnPid, StreamRef, 5000, MonitorRef)
    +
    +await(ConnPid, StreamRef, Timeout)
    +    -> await(ConnPid, StreamRef, Timeout, MonitorRef)
    +
    +await(ConnPid, StreamRef, Timeout, MonitorRef)
    +    -> Result
    +
    +ConnPid    :: pid()
    +StreamRef  :: reference()
    +MonitorRef :: reference()
    +Timeout    :: timeout()
    +Result     :: tuple() - see below
    +
    +

    Wait for a response.

    +

    This function waits for a message from the given stream and returns it as a tuple. An error will be returned should the process fail or a relevant message is not received within the specified duration.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream for the original request.

    +
    +
    Timeout
    +

    How long to wait for a message, in milliseconds.

    +
    +
    MonitorRef
    +

    Monitor for the Gun connection process.

    +

    A monitor is automatically created for the duration of this call when one is not provided.

    +
    +
    +

    Return value

    +

    A number of different tuples can be returned. They correspond to the message of the same name and they contain the same elements minus the pid and stream reference. Error tuples may also be returned when a timeout or an error occur.

    +
    +
    Result :: {inform, Status, Headers}
    +        | {response, IsFin, Status, Headers}
    +        | {data, IsFin, Data}
    +        | {trailers, Trailers}
    +        | {push, NewStreamRef, Method, URI, Headers}
    +        | {upgrade, Protocols, Headers}
    +        | {ws, Frame}
    +        | {error, Reason}
    +
    +Reason :: {stream_error | connection_error | down, any()}
    +        | timeout
    +
    +

    Because the messages and returned tuples are equivalent, please refer to the manual pages for each message for further information:

    + +

    Changelog

    +
    • 2.0: upgrade and ws tuples can now be returned. +
    • +
    • 2.0: The error tuple type now includes the type of error. +
    • +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Wait for a response
    +
    +
    StreamRef = gun:get(ConnPid, "/articles", [
    +    {<<"accept">>, <<"text/html;q=1.0, application/xml;q=0.1">>}
    +]).
    +{response, nofin, 200, _Headers} = gun:await(ConnPid, StreamRef).
    +{data, fin, <<"Hello world!">>} = gun:await(ConnPid, StreamRef).
    +
    +

    See also

    +

    gun(3), gun:get(3), gun:head(3), gun:options(3), gun:patch(3), gun:post(3), gun:put(3), gun:delete(3), gun:headers(3), gun:request(3), gun:await_body(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.await_body/index.html b/docs/en/gun/2.0/manual/gun.await_body/index.html new file mode 100644 index 00000000..c1085e6e --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.await_body/index.html @@ -0,0 +1,223 @@ + + + + + + + + + + Nine Nines: gun:await_body(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:await_body(3)

    + +

    Name

    +

    gun:await_body - Wait for the complete response body

    +

    Description

    +
    +
    await_body(ConnPid, StreamRef)
    +    -> await_body(ConnPid, StreamRef, 5000, MonitorRef)
    +
    +await_body(ConnPid, StreamRef, MonitorRef)
    +    -> await_body(ConnPid, StreamRef, 5000, MonitorRef)
    +
    +await_body(ConnPid, StreamRef, Timeout)
    +    -> await_body(ConnPid, StreamRef, Timeout, MonitorRef)
    +
    +await_body(ConnPid, StreamRef, Timeout, MonitorRef)
    +    -> {ok, Body} | {ok, Body, Trailers} | {error, Reason}
    +
    +ConnPid    :: pid()
    +StreamRef  :: reference()
    +MonitorRef :: reference()
    +Timeout    :: timeout()
    +Body       :: binary()
    +Trailers   :: [{binary(), binary()}]
    +Reason     :: {stream_error | connection_error | down, any()}
    +            | timeout
    +
    +

    Wait for the complete response body.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream for the original request.

    +
    +
    Timeout
    +

    How long to wait for each message, in milliseconds.

    +
    +
    MonitorRef
    +

    Monitor for the Gun connection process.

    +

    A monitor is automatically created for the duration of this call when one is not provided.

    +
    +
    +

    Return value

    +

    The body is returned, possibly with trailers if the request contained a te: trailers header. Error tuples may also be returned when a timeout or an error occur.

    +

    Changelog

    +
    • 2.0: The error tuple type now includes the type of error. +
    • +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Wait for the complete response body
    +
    +
    StreamRef = gun:get(ConnPid, "/articles", [
    +    {<<"accept">>, <<"text/html;q=1.0, application/xml;q=0.1">>}
    +]).
    +{response, nofin, 200, _Headers} = gun:await(ConnPid, StreamRef).
    +{ok, _Body} = gun:await_body(ConnPid, StreamRef).
    +
    +

    See also

    +

    gun(3), gun:get(3), gun:head(3), gun:options(3), gun:patch(3), gun:post(3), gun:put(3), gun:delete(3), gun:headers(3), gun:request(3), gun:await(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.await_up/index.html b/docs/en/gun/2.0/manual/gun.await_up/index.html new file mode 100644 index 00000000..3b951709 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.await_up/index.html @@ -0,0 +1,214 @@ + + + + + + + + + + Nine Nines: gun:await_up(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:await_up(3)

    + +

    Name

    +

    gun:await_up - Wait for the connection to be up

    +

    Description

    +
    +
    await_up(ConnPid)
    +    -> await_up(ConnPid, 5000, MonitorRef)
    +
    +await_up(ConnPid, MonitorRef)
    +    -> await_up(ConnPid, 5000, MonitorRef)
    +
    +await_up(ConnPid, Timeout)
    +    -> await_up(ConnPid, Timeout, MonitorRef)
    +
    +await_up(ConnPid, Timeout, MonitorRef)
    +    -> {ok, Protocol} | {error, Reason}
    +
    +ConnPid    :: pid()
    +MonitorRef :: reference()
    +Timeout    :: timeout()
    +Protocol   :: http | http2 | socks
    +Reason     :: {down, any()} | timeout
    +
    +

    Wait for the connection to be up.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Timeout
    +

    How long to wait for, in milliseconds.

    +
    +
    MonitorRef
    +

    Monitor for the Gun connection process.

    +

    A monitor is automatically created for the duration of this call when one is not provided.

    +
    +
    +

    Return value

    +

    The protocol selected for this connection. It can be used to determine the capabilities of the server. Error tuples may also be returned when a timeout or an error occur.

    +

    Changelog

    +
    • 2.0: The error tuple type now includes the type of error. +
    • +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Wait for the connection to be up
    +
    +
    {ok, ConnPid} = gun:open("example.org", 443).
    +{ok, _} = gun:await_up(ConnPid).
    +
    +

    See also

    +

    gun(3), gun:open(3), gun:open_unix(3), gun_socks_up(3), gun_up(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.cancel/index.html b/docs/en/gun/2.0/manual/gun.cancel/index.html new file mode 100644 index 00000000..7f9f10ea --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.cancel/index.html @@ -0,0 +1,198 @@ + + + + + + + + + + Nine Nines: gun:cancel(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:cancel(3)

    + +

    Name

    +

    gun:cancel - Cancel the given stream

    +

    Description

    +
    +
    cancel(ConnPid, StreamRef) -> ok
    +
    +ConnPid   :: pid()
    +StreamRef :: reference()
    +
    +

    Cancel the given stream.

    +

    The behavior of this function depends on the protocol selected.

    +

    HTTP/1.1 does not support this feature. Gun will simply silence the stream and stop relaying messages. Gun may also decide to close the connection if the response body is too large, to avoid wasting time and bandwidth.

    +

    HTTP/2 allows cancelling streams at any time.

    +

    This function is asynchronous. Messages related to this stream may still be sent after the function returns.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream for the original request.

    +
    +
    +

    Return value

    +

    The atom ok is returned.

    +

    Changelog

    +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Cancel a stream
    +
    +
    gun:cancel(ConnPid, StreamRef).
    +
    +

    See also

    +

    gun(3), gun:get(3), gun:head(3), gun:options(3), gun:patch(3), gun:post(3), gun:put(3), gun:delete(3), gun:headers(3), gun:request(3), gun:stream_info(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.close/index.html b/docs/en/gun/2.0/manual/gun.close/index.html new file mode 100644 index 00000000..abb39734 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.close/index.html @@ -0,0 +1,190 @@ + + + + + + + + + + Nine Nines: gun:close(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:close(3)

    + +

    Name

    +

    gun:close - Brutally close the connection

    +

    Description

    +
    +
    close(ConnPid) -> ok
    +
    +ConnPid :: pid()
    +
    +

    Brutally close the connection.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    +

    Return value

    +

    The atom ok is returned.

    +

    Changelog

    +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Close the connection
    +
    +
    ok = gun:close(ConnPid).
    +
    +

    See also

    +

    gun(3), gun:open(3), gun:open_unix(3), gun:shutdown(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.connect/index.html b/docs/en/gun/2.0/manual/gun.connect/index.html new file mode 100644 index 00000000..9117d3bd --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.connect/index.html @@ -0,0 +1,251 @@ + + + + + + + + + + Nine Nines: gun:connect(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:connect(3)

    + +

    Name

    +

    gun:connect - Establish a tunnel to the origin server

    +

    Description

    +
    +
    connect(ConnPid, Destination)
    +    -> connect(ConnPid, Destination, [], #{}).
    +
    +connect(ConnPid, Destination, Headers)
    +    -> connect(ConnPid, Destination, Headers, #{}).
    +
    +connect(ConnPid, Destination, Headers, ReqOpts)
    +    -> StreamRef
    +
    +ConnPid     :: pid()
    +Destination :: gun:connect_destination()
    +Headers     :: gun:req_headers()
    +ReqOpts     :: gun:req_opts()
    +StreamRef   :: reference()
    +
    +

    Establish a tunnel to the origin server.

    +

    This feature is currently only available for HTTP/1.1 connections. Upon successful completion of the CONNECT request a tunnel is established and subsequent requests will go through the tunnel.

    +

    Gun will not automatically re-issue the CONNECT request upon reconnection to the proxy server. The gun_up message can be used to know when the tunnel needs to be established again.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Destination
    +

    Destination of the CONNECT request.

    +
    +
    Headers
    +

    Additional request headers.

    +
    +
    ReqOpts
    +

    Request options.

    +
    +
    +

    Return value

    +

    A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.

    +

    Changelog

    +
    • 1.2: Function introduced. +
    • +
    +

    Examples

    +
    Establish a tunnel
    +
    +
    {ok, ConnPid} = gun:open("proxy.example.org", 1080),
    +{ok, http} = gun:await_up(ConnPid),
    +StreamRef = gun:connect(ConnPid, #{
    +    host => "origin-server.example.org",
    +    port => 80
    +}),
    +{response, fin, 200, _} = gun:await(ConnPid, StreamRef),
    +%% Subsequent requests will be sent to origin-server.example.org.
    +
    +
    Establish a tunnel for a secure HTTP/2 connection
    +
    +
    {ok, ConnPid} = gun:open("proxy.example.org", 1080),
    +{ok, http} = gun:await_up(ConnPid),
    +StreamRef = gun:connect(ConnPid, #{
    +    host => "origin-server.example.org",
    +    port => 443,
    +    protocols => [http2],
    +    transport => tls
    +}),
    +{response, fin, 200, _} = gun:await(ConnPid, StreamRef),
    +%% Subsequent requests will be sent to origin-server.example.org.
    +
    +
    Establish a tunnel using proxy authorization
    +
    +
    {ok, ConnPid} = gun:open("proxy.example.org", 1080),
    +{ok, http} = gun:await_up(ConnPid),
    +StreamRef = gun:connect(ConnPid, #{
    +    host => "origin-server.example.org",
    +    port => 80,
    +    username => "essen",
    +    password => "myrealpasswordis"
    +}),
    +{response, fin, 200, _} = gun:await(ConnPid, StreamRef),
    +%% Subsequent requests will be sent to origin-server.example.org.
    +
    +

    See also

    +

    gun(3), gun:await_up(3), gun_up(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.data/index.html b/docs/en/gun/2.0/manual/gun.data/index.html new file mode 100644 index 00000000..54d1ff90 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.data/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + Nine Nines: gun:data(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:data(3)

    + +

    Name

    +

    gun:data - Stream the body of a request

    +

    Description

    +
    +
    data(ConnPid, StreamRef, IsFin, Data) -> ok
    +
    +ConnPid   :: pid()
    +StreamRef :: reference()
    +IsFin     :: fin | nofin
    +Data      :: iodata()
    +
    +

    Stream the body of a request.

    +

    This function can only be used if the original request had headers indicating that a body would be streamed.

    +

    All calls to this function must use the nofin flag except for the last which must use fin to indicate the end of the request body.

    +

    Empty data is allowed regardless of the value of IsFin. Gun may or may not send empty data chunks, however.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream for the original request.

    +
    +
    IsFin
    +

    Whether this message terminates the request.

    +
    +
    Data
    +

    All or part of the response body.

    +
    +
    +

    Return value

    +

    The atom ok is returned.

    +

    Changelog

    +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Stream the body of a request
    +
    +
    StreamRef = gun:put(ConnPid, "/lang/fr_FR/hello", [
    +    {<<"content-type">>, <<"text/plain">>}
    +]).
    +gun:data(ConnPid, StreamRef, nofin, <<"Bonjour !\n">>).
    +gun:data(ConnPid, StreamRef, fin, <<"Bonsoir !\n">>).
    +
    +

    See also

    +

    gun(3), gun:patch(3), gun:post(3), gun:put(3), gun:headers(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.delete/index.html b/docs/en/gun/2.0/manual/gun.delete/index.html new file mode 100644 index 00000000..0b83c626 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.delete/index.html @@ -0,0 +1,218 @@ + + + + + + + + + + Nine Nines: gun:delete(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:delete(3)

    + +

    Name

    +

    gun:delete - Delete a resource

    +

    Description

    +
    +
    delete(ConnPid, Path)
    +    -> delete(ConnPid, Path, [], #{}).
    +
    +delete(ConnPid, Path, Headers)
    +    -> delete(ConnPid, Path, Headers, #{})
    +
    +delete(ConnPid, Path, Headers, ReqOpts)
    +    -> StreamRef
    +
    +ConnPid   :: pid()
    +Path      :: iodata()
    +Headers   :: gun:req_headers()
    +ReqOpts   :: gun:req_opts()
    +StreamRef :: reference()
    +
    +

    Delete a resource.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Path
    +

    Path to the resource.

    +
    +
    Headers
    +

    Additional request headers.

    +
    +
    ReqOpts
    +

    Request options.

    +
    +
    +

    Return value

    +

    A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.

    +

    Changelog

    +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Delete a resource
    +
    +
    StreamRef = gun:delete(ConnPid, "/drafts/123").
    +
    +
    Delete a resource with request options
    +
    +
    StreamRef = gun:delete(ConnPid, "/drafts/123", [],
    +    #{reply_to => ReplyToPid}).
    +
    +

    See also

    +

    gun(3), gun:put(3), gun:await(3), gun:await_body(3), gun_push(3), gun_inform(3), gun_response(3), gun_data(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.flush/index.html b/docs/en/gun/2.0/manual/gun.flush/index.html new file mode 100644 index 00000000..d07e5264 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.flush/index.html @@ -0,0 +1,203 @@ + + + + + + + + + + Nine Nines: gun:flush(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:flush(3)

    + +

    Name

    +

    gun:flush - Flush all messages related to a connection or a stream

    +

    Description

    +
    +
    flush(ConnPid) -> ok
    +flush(StreamRef) -> ok
    +
    +ConnPid    :: pid()
    +StreamRef  :: reference()
    +
    +

    Flush all messages related to a connection or a stream.

    +

    Arguments

    +

    Either of these arguments may be provided:

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream for the original request.

    +
    +
    +

    Return value

    +

    The atom ok is returned.

    +

    Changelog

    +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Flush all messages from a connection
    +
    +
    gun:flush(ConnPid).
    +
    +
    Flush messages from a single stream
    +
    +
    gun:flush(StreamRef).
    +
    +

    See also

    +

    gun(3), gun:await(3), gun:await_body(3), gun:await_up(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.get/index.html b/docs/en/gun/2.0/manual/gun.get/index.html new file mode 100644 index 00000000..abb20b40 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.get/index.html @@ -0,0 +1,221 @@ + + + + + + + + + + Nine Nines: gun:get(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:get(3)

    + +

    Name

    +

    gun:get - Get a resource representation

    +

    Description

    +
    +
    get(ConnPid, Path)
    +    -> get(ConnPid, Path, [], #{}).
    +
    +get(ConnPid, Path, Headers)
    +    -> get(ConnPid, Path, Headers, #{})
    +
    +get(ConnPid, Path, Headers, ReqOpts)
    +    -> StreamRef
    +
    +ConnPid   :: pid()
    +Path      :: iodata()
    +Headers   :: gun:req_headers()
    +ReqOpts   :: gun:req_opts()
    +StreamRef :: reference()
    +
    +

    Get a resource representation.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Path
    +

    Path to the resource.

    +
    +
    Headers
    +

    Additional request headers.

    +
    +
    ReqOpts
    +

    Request options.

    +
    +
    +

    Return value

    +

    A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.

    +

    Changelog

    +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Get a resource representation
    +
    +
    StreamRef = gun:get(ConnPid, "/articles", [
    +    {<<"accept">>, <<"text/html;q=1.0, application/xml;q=0.1">>}
    +]).
    +
    +
    Get a resource representation with request options
    +
    +
    StreamRef = gun:get(ConnPid, "/articles", [], #{
    +    reply_to => ReplyToPid
    +}).
    +
    +

    See also

    +

    gun(3), gun:head(3), gun:await(3), gun:await_body(3), gun_push(3), gun_inform(3), gun_response(3), gun_data(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.head/index.html b/docs/en/gun/2.0/manual/gun.head/index.html new file mode 100644 index 00000000..fb6662f2 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.head/index.html @@ -0,0 +1,223 @@ + + + + + + + + + + Nine Nines: gun:head(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:head(3)

    + +

    Name

    +

    gun:head - Get headers of a resource representation

    +

    Description

    +
    +
    head(ConnPid, Path)
    +    -> head(ConnPid, Path, [], #{}).
    +
    +head(ConnPid, Path, Headers)
    +    -> head(ConnPid, Path, Headers, #{})
    +
    +head(ConnPid, Path, Headers, ReqOpts)
    +    -> StreamRef
    +
    +ConnPid   :: pid()
    +Path      :: iodata()
    +Headers   :: gun:req_headers()
    +ReqOpts   :: gun:req_opts()
    +StreamRef :: reference()
    +
    +

    Get headers of a resource representation.

    +

    This function performs the same operation as gun:get(3), except the server will not send the resource representation, only the response's status code and headers.

    +

    While servers are supposed to send the same headers as for a GET request, they sometimes will not. For example the content-length header may be dropped from the response.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Path
    +

    Path to the resource.

    +
    +
    Headers
    +

    Additional request headers.

    +
    +
    ReqOpts
    +

    Request options.

    +
    +
    +

    Return value

    +

    A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.

    +

    Changelog

    +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Get headers of a resource representation
    +
    +
    StreamRef = gun:head(ConnPid, "/articles", [
    +    {<<"accept">>, <<"text/html;q=1.0, application/xml;q=0.1">>}
    +]).
    +
    +
    Get headers of a resource representation with request options
    +
    +
    StreamRef = gun:head(ConnPid, "/articles", [], #{
    +    reply_to => ReplyToPid
    +}).
    +
    +

    See also

    +

    gun(3), gun:head(3), gun:await(3), gun_push(3), gun_inform(3), gun_response(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.headers/index.html b/docs/en/gun/2.0/manual/gun.headers/index.html new file mode 100644 index 00000000..cbece0b0 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.headers/index.html @@ -0,0 +1,215 @@ + + + + + + + + + + Nine Nines: gun:headers(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:headers(3)

    + +

    Name

    +

    gun:headers - Initiate the given request

    +

    Description

    +
    +
    headers(ConnPid, Method, Path, Headers)
    +    -> headers(ConnPid, Method, Path, Headers, #{})
    +
    +headers(ConnPid, Method, Path, Headers, ReqOpts)
    +    -> StreamRef
    +
    +ConnPid   :: pid()
    +Method    :: binary()
    +Path      :: iodata()
    +Headers   :: gun:req_headers()
    +ReqOpts   :: gun:req_opts()
    +StreamRef :: reference()
    +
    +

    Initiate the given request.

    +

    This is a general purpose function that should only be used when other method-specific functions do not apply.

    +

    The function headers/4,5 initiates a request but does not send the request body. It must be sent separately using gun:data(3).

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Method
    +

    Method to be used for the request.

    +
    +
    Path
    +

    Path to the resource.

    +
    +
    Headers
    +

    Additional request headers.

    +
    +
    ReqOpts
    +

    Request options.

    +
    +
    +

    Return value

    +

    A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.

    +

    Changelog

    +
    • 2.0: Function introduced. +
    • +
    +

    Examples

    +
    Initiate a request
    +
    +
    StreamRef = gun:headers(ConnPid, <<"PUT">>,
    +    "/lang/fr_FR/hello",
    +    [{<<"content-type">>, <<"text/plain">>}]).
    +
    +

    See also

    +

    gun(3), gun:request(3), gun:await(3), gun:await_body(3), gun_push(3), gun_inform(3), gun_response(3), gun_data(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.info/index.html b/docs/en/gun/2.0/manual/gun.info/index.html new file mode 100644 index 00000000..bc8ccb13 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.info/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + Nine Nines: gun:info(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:info(3)

    + +

    Name

    +

    gun:info - Obtain information about the connection

    +

    Description

    +
    +
    info(ConnPid) -> Info
    +
    +ConnPid :: pid()
    +Info :: #{
    +    owner          => pid(),
    +    socket         => inet:socket() | ssl:sslsocket(),
    +    transport      => tcp | tls,
    +    protocol       => http | http2 | socks | ws,
    +    sock_ip        => inet:ip_address(),
    +    sock_port      => inet:port_number(),
    +    origin_host    => inet:hostname() | inet:ip_address(),
    +    origin_port    => inet:port_number(),
    +    intermediaries => [Intermediary]
    +}
    +Intermediary :: #{
    +    type      => connect | socks5,
    +    host      => inet:hostname() | inet:ip_address(),
    +    port      => inet:port_number(),
    +    transport => tcp | tls,
    +    protocol  => http | http2 | socks
    +}
    +
    +

    Obtain information about the connection.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    +

    Return value

    +

    A map is returned containing various informations about the connection.

    +

    Changelog

    +
    • 2.0: The value owner was added. +
    • +
    • 1.3: The values socket, transport, protocol, origin_host, origin_port and intermediaries were added. +
    • +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Obtain information about the connection
    +
    +
    Info = gun:info(ConnPid).
    +
    +

    See also

    +

    gun(3), gun:open(3), gun:open_unix(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.open/index.html b/docs/en/gun/2.0/manual/gun.open/index.html new file mode 100644 index 00000000..ee859c8e --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.open/index.html @@ -0,0 +1,218 @@ + + + + + + + + + + Nine Nines: gun:open(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:open(3)

    + +

    Name

    +

    gun:open - Open a connection to the given host and port

    +

    Description

    +
    +
    open(Host, Port)       -> open(Host, Port, #{})
    +open(Host, Port, Opts) -> {ok, pid()} | {error, Reason}
    +
    +Host    :: inet:hostname() | inet:ip_address()
    +Port    :: inet:port_number()
    +Opts    :: gun:opts()
    +Reason  :: {options, OptName}
    +         | {options, {http | http2 | socks | ws, OptName}}
    +         | any()
    +OptName :: atom()
    +
    +

    Open a connection to the given host and port.

    +

    Arguments

    +
    Host
    +

    Host or IP address to connect to.

    +
    +
    Port
    +

    Port to connect to.

    +
    +
    Opts
    +

    Options for this connection.

    +
    +
    +

    Return value

    +

    The pid of the newly created Gun process is returned. Note that this does not indicate that the connection has been successfully opened; the gun_up(3) message will be sent for that.

    +

    Changelog

    +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Connect to a server
    +
    +
    {ok, ConnPid} = gun:open("example.org", 443).
    +
    +
    Connect to a server with custom options
    +
    +
    {ok, ConnPid} = gun:open("example.org", 443,
    +    #{protocols => [http2]}).
    +
    +
    Connect to a server using its IP address
    +
    +
    {ok, ConnPid} = gun:open({127,0,0,1}, 443).
    +
    +

    See also

    +

    gun(3), gun:open_unix(3), gun:await_up(3), gun_socks_up(3), gun_up(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.open_unix/index.html b/docs/en/gun/2.0/manual/gun.open_unix/index.html new file mode 100644 index 00000000..5c15df10 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.open_unix/index.html @@ -0,0 +1,206 @@ + + + + + + + + + + Nine Nines: gun:open_unix(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:open_unix(3)

    + +

    Name

    +

    gun:open_unix - Open a connection to the given Unix domain socket

    +

    Description

    +
    +
    open_unix(SocketPath, Opts) -> {ok, pid()} | {error, Reason}
    +
    +SocketPath :: string()
    +Opts       :: gun:opts()
    +Reason     :: {options, OptName}
    +            | {options, {http | http2 | socks | ws, OptName}}
    +            | any()
    +OptName    :: atom()
    +
    +

    Open a connection to the given Unix domain socket.

    +

    Arguments

    +
    SocketPath
    +

    Path to the Unix domain socket to connect to.

    +
    +
    Opts
    +

    Options for this connection.

    +
    +
    +

    Return value

    +

    The pid of the newly created Gun process is returned. Note that this does not indicate that the connection has been successfully opened; the gun_up(3) message will be sent for that.

    +

    Changelog

    +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Connect to a server via a Unix domain socket
    +
    +
    {ok, ConnPid} = gun:open_unix("/var/run/dbus/system_bus_socket", #{}).
    +
    +
    Connect to a server via a Unix domain socket with custom options
    +
    +
    {ok, ConnPid} = gun:open_unix("/var/run/dbus/system_bus_socket",
    +    #{protocols => [http2]}).
    +
    +

    See also

    +

    gun(3), gun:open(3), gun:await_up(3), gun_socks_up(3), gun_up(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.options/index.html b/docs/en/gun/2.0/manual/gun.options/index.html new file mode 100644 index 00000000..441f1199 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.options/index.html @@ -0,0 +1,218 @@ + + + + + + + + + + Nine Nines: gun:options(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:options(3)

    + +

    Name

    +

    gun:options - Query the capabilities of the server or a resource

    +

    Description

    +
    +
    options(ConnPid, Path)
    +    -> options(ConnPid, Path, [], #{}).
    +
    +options(ConnPid, Path, Headers)
    +    -> options(ConnPid, Path, Headers, #{})
    +
    +options(ConnPid, Path, Headers, ReqOpts)
    +    -> StreamRef
    +
    +ConnPid   :: pid()
    +Path      :: iodata()
    +Headers   :: gun:req_headers()
    +ReqOpts   :: gun:req_opts()
    +StreamRef :: reference()
    +
    +

    Query the capabilities of the server or a resource.

    +

    The special path "*" can be used to obtain information about the server as a whole. Any other path will return information about that resource specifically.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Path
    +

    Path to the resource.

    +
    +
    Headers
    +

    Additional request headers.

    +
    +
    ReqOpts
    +

    Request options.

    +
    +
    +

    Return value

    +

    A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.

    +

    Changelog

    +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Query the capabilities of the server
    +
    +
    StreamRef = gun:options(ConnPid, "*").
    +
    +
    Query the capabilities of a resource
    +
    +
    StreamRef = gun:options(ConnPid, "/articles").
    +
    +

    See also

    +

    gun(3), gun:await(3), gun:await_body(3), gun_inform(3), gun_response(3), gun_data(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.patch/index.html b/docs/en/gun/2.0/manual/gun.patch/index.html new file mode 100644 index 00000000..55186a18 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.patch/index.html @@ -0,0 +1,246 @@ + + + + + + + + + + Nine Nines: gun:patch(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:patch(3)

    + +

    Name

    +

    gun:patch - Apply a set of changes to a resource

    +

    Description

    +
    +
    patch(ConnPid, Path, Headers)
    +    -> patch(ConnPid, Path, Headers, #{})
    +
    +patch(ConnPid, Path, Headers, ReqOpts)
    +    -> StreamRef
    +
    +patch(ConnPid, Path, Headers, Body)
    +    -> patch(ConnPid, Path, Headers, Body, #{})
    +
    +patch(ConnPid, Path, Headers, Body, ReqOpts)
    +    -> StreamRef
    +
    +ConnPid   :: pid()
    +Path      :: iodata()
    +Headers   :: gun:req_headers()
    +Body      :: iodata()
    +ReqOpts   :: gun:req_opts()
    +StreamRef :: reference()
    +
    +

    Apply a set of changes to a resource.

    +

    The behavior of this function varies depending on whether a body is provided.

    +

    The function patch/3,4 does not send a body. It must be sent separately using gun:data(3).

    +

    The function patch/4,5 sends the entire request, including the request body, immediately. It is therefore not possible to use gun:data(3) after that. You should provide a content-type header. Gun will set the content-length header automatically.

    +

    The body sent in this request should be a patch document with instructions on how to update the resource.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Path
    +

    Path to the resource.

    +
    +
    Headers
    +

    Additional request headers.

    +
    +
    Body
    +

    Request body.

    +
    +
    ReqOpts
    +

    Request options.

    +
    +
    +

    Return value

    +

    A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related 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

    +
    Patch a resource
    +
    +
    StreamRef = gun:patch(ConnPid, "/users/1",
    +    [{<<"content-type">>, <<"application/json-patch+json">>}],
    +    <<"[{\"op\":\"add\",\"path\":\"/baz\",\"value\":\"qux\"}]">>).
    +
    +
    Patch a resource in multiple calls
    +
    +
    StreamRef = gun:patch(ConnPid, "/users/1", [
    +    {<<"content-type">>, <<"application/json-patch+json">>}
    +]).
    +gun:data(ConnPid, StreamRef, fin,
    +    <<"[{\"op\":\"add\",\"path\":\"/baz\",\"value\":\"qux\"}]">>).
    +
    +
    Patch a resource with request options
    +
    +
    StreamRef = gun:patch(ConnPid, "/users/1",
    +    [{<<"content-type">>, <<"application/json-patch+json">>}],
    +    <<"[{\"op\":\"add\",\"path\":\"/baz\",\"value\":\"qux\"}]">>,
    +    #{reply_to => ReplyToPid}).
    +
    +

    See also

    +

    gun(3), gun:post(3), gun:put(3), gun:await(3), gun:await_body(3), gun_push(3), gun_inform(3), gun_response(3), gun_data(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.post/index.html b/docs/en/gun/2.0/manual/gun.post/index.html new file mode 100644 index 00000000..0001b069 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.post/index.html @@ -0,0 +1,244 @@ + + + + + + + + + + Nine Nines: gun:post(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:post(3)

    + +

    Name

    +

    gun:post - Process the enclosed representation according to a resource's own semantics

    +

    Description

    +
    +
    post(ConnPid, Path, Headers)
    +    -> post(ConnPid, Path, Headers, #{})
    +
    +post(ConnPid, Path, Headers, ReqOpts)
    +    -> StreamRef
    +
    +post(ConnPid, Path, Headers, Body)
    +    -> post(ConnPid, Path, Headers, Body, #{})
    +
    +post(ConnPid, Path, Headers, Body, ReqOpts)
    +    -> StreamRef
    +
    +ConnPid   :: pid()
    +Path      :: iodata()
    +Headers   :: gun:req_headers()
    +Body      :: iodata()
    +ReqOpts   :: gun:req_opts()
    +StreamRef :: reference()
    +
    +

    Process the enclosed representation according to a resource's own semantics.

    +

    The behavior of this function varies depending on whether a body is provided.

    +

    The function post/3,4 does not send a body. It must be sent separately using gun:data(3).

    +

    The function post/4,5 sends the entire request, including the request body, immediately. It is therefore not possible to use gun:data(3) after that. You should provide a content-type header. Gun will set the content-length header automatically.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Path
    +

    Path to the resource.

    +
    +
    Headers
    +

    Additional request headers.

    +
    +
    Body
    +

    Request body.

    +
    +
    ReqOpts
    +

    Request options.

    +
    +
    +

    Return value

    +

    A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related 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

    +
    Post to a resource
    +
    +
    StreamRef = gun:post(ConnPid, "/search",
    +    [{<<"content-type">>, <<"application/x-www-form-urlencoded">>}],
    +    <<"q=nine%20nines">>).
    +
    +
    Post to a resource in multiple calls
    +
    +
    StreamRef = gun:post(ConnPid, "/search", [
    +    {<<"content-type">>, <<"application/x-www-form-urlencoded">>}
    +]).
    +gun:data(ConnPid, StreamRef, fin, <<"q=nine%20nines">>).
    +
    +
    Post to a resource with request options
    +
    +
    StreamRef = gun:post(ConnPid, "/search",
    +    [{<<"content-type">>, <<"application/x-www-form-urlencoded">>}],
    +    <<"q=nine%20nines">>,
    +    #{reply_to => ReplyToPid}).
    +
    +

    See also

    +

    gun(3), gun:patch(3), gun:put(3), gun:await(3), gun:await_body(3), gun_push(3), gun_inform(3), gun_response(3), gun_data(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.put/index.html b/docs/en/gun/2.0/manual/gun.put/index.html new file mode 100644 index 00000000..1352ee43 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.put/index.html @@ -0,0 +1,244 @@ + + + + + + + + + + Nine Nines: gun:put(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:put(3)

    + +

    Name

    +

    gun:put - Create or replace a resource

    +

    Description

    +
    +
    put(ConnPid, Path, Headers)
    +    -> put(ConnPid, Path, Headers, #{})
    +
    +put(ConnPid, Path, Headers, ReqOpts)
    +    -> StreamRef
    +
    +put(ConnPid, Path, Headers, Body)
    +    -> put(ConnPid, Path, Headers, Body, #{})
    +
    +put(ConnPid, Path, Headers, Body, ReqOpts)
    +    -> StreamRef
    +
    +ConnPid   :: pid()
    +Path      :: iodata()
    +Headers   :: gun:req_headers()
    +Body      :: iodata()
    +ReqOpts   :: gun:req_opts()
    +StreamRef :: reference()
    +
    +

    Create or replace a resource.

    +

    The behavior of this function varies depending on whether a body is provided.

    +

    The function put/3,4 does not send a body. It must be sent separately using gun:data(3).

    +

    The function put/4,5 sends the entire request, including the request body, immediately. It is therefore not possible to use gun:data(3) after that. You should provide a content-type header. Gun will set the content-length header automatically.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Path
    +

    Path to the resource.

    +
    +
    Headers
    +

    Additional request headers.

    +
    +
    Body
    +

    Request body.

    +
    +
    ReqOpts
    +

    Request options.

    +
    +
    +

    Return value

    +

    A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related 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

    +
    Put a resource
    +
    +
    StreamRef = gun:put(ConnPid, "/lang/fr_FR/hello",
    +    [{<<"content-type">>, <<"text/plain">>}],
    +    <<"Bonjour !">>).
    +
    +
    Put a resource in multiple calls
    +
    +
    StreamRef = gun:put(ConnPid, "/lang/fr_FR/hello", [
    +    {<<"content-type">>, <<"text/plain">>}
    +]).
    +gun:data(ConnPid, StreamRef, fin, <<"Bonjour !">>).
    +
    +
    Put a resource with request options
    +
    +
    StreamRef = gun:put(ConnPid, "/lang/fr_FR/hello",
    +    [{<<"content-type">>, <<"text/plain">>}],
    +    <<"Bonjour !">>,
    +    #{reply_to => ReplyToPid}).
    +
    +

    See also

    +

    gun(3), gun:patch(3), gun:post(3), gun:await(3), gun:await_body(3), gun_push(3), gun_inform(3), gun_response(3), gun_data(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.request/index.html b/docs/en/gun/2.0/manual/gun.request/index.html new file mode 100644 index 00000000..dcdeacec --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.request/index.html @@ -0,0 +1,222 @@ + + + + + + + + + + Nine Nines: gun:request(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:request(3)

    + +

    Name

    +

    gun:request - Perform the given request

    +

    Description

    +
    +
    request(ConnPid, Method, Path, Headers, Body)
    +    -> request(ConnPid, Method, Path, Headers, Body, #{})
    +
    +request(ConnPid, Method, Path, Headers, Body, ReqOpts)
    +    -> StreamRef
    +
    +ConnPid   :: pid()
    +Method    :: binary()
    +Path      :: iodata()
    +Headers   :: gun:req_headers()
    +Body      :: iodata()
    +ReqOpts   :: gun:req_opts()
    +StreamRef :: reference()
    +
    +

    Perform the given request.

    +

    This is a general purpose function that should only be used when other method-specific functions do not apply.

    +

    The function request/5,6 sends the entire request, including the request body, immediately. It is therefore not possible to use gun:data(3) after that. You should provide a content-type header. Gun will set the content-length header automatically.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Method
    +

    Method to be used for the request.

    +
    +
    Path
    +

    Path to the resource.

    +
    +
    Headers
    +

    Additional request headers.

    +
    +
    Body
    +

    Request body.

    +
    +
    ReqOpts
    +

    Request options.

    +
    +
    +

    Return value

    +

    A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related 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 gun:headers(3). +
    • +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Perform a request
    +
    +
    StreamRef = gun:request(ConnPid, <<"PUT">>,
    +    "/lang/fr_FR/hello",
    +    [{<<"content-type">>, <<"text/plain">>}],
    +    <<"Bonjour !">>).
    +
    +

    See also

    +

    gun(3), gun:headers(3), gun:await(3), gun:await_body(3), gun_push(3), gun_inform(3), gun_response(3), gun_data(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.set_owner/index.html b/docs/en/gun/2.0/manual/gun.set_owner/index.html new file mode 100644 index 00000000..661aa535 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.set_owner/index.html @@ -0,0 +1,196 @@ + + + + + + + + + + Nine Nines: gun:set_owner(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:set_owner(3)

    + +

    Name

    +

    gun:set_owner - Set a new owner for the connection

    +

    Description

    +
    +
    set_owner(ConnPid, OwnerPid) -> ok
    +
    +ConnPid  :: pid()
    +OwnerPid :: pid()
    +
    +

    Set a new owner for the connection.

    +

    Only the current owner of the connection can set a new owner.

    +

    Gun monitors the owner of the connection and automatically shuts down gracefully when the owner exits.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    OwnerPid
    +

    The pid of the new owner for the connection.

    +
    +
    +

    Return value

    +

    The atom ok is returned.

    +

    Changelog

    +
    • 2.0: Function introduced. +
    • +
    +

    Examples

    +
    Set a new owner for the connection
    +
    +
    ok = gun:set_owner(ConnPid, OwnerPid).
    +
    +

    See also

    +

    gun(3), gun:open(3), gun:open_unix(3), gun:shutdown(3), gun:close(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.shutdown/index.html b/docs/en/gun/2.0/manual/gun.shutdown/index.html new file mode 100644 index 00000000..76f8ee21 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.shutdown/index.html @@ -0,0 +1,200 @@ + + + + + + + + + + Nine Nines: gun:shutdown(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:shutdown(3)

    + +

    Name

    +

    gun:shutdown - Gracefully close the connection

    +

    Description

    +
    +
    shutdown(ConnPid) -> ok
    +
    +ConnPid :: pid()
    +
    +

    Gracefully close the connection.

    +

    Gun will wait for up to closing_timeout milliseconds before brutally closing the connection. The graceful shutdown mechanism varies between the different protocols:

    +
    • For HTTP/1.1 there is no such mechanism and Gun will close the connection once the current response is received. Any pipelined requests are immediately terminated. +
    • +
    • For HTTP/2 Gun will send a GOAWAY frame and wait for the existing streams to terminate. +
    • +
    • For Websocket Gun will send a close frame and wait for the server's close frame before closing the connection. +
    • +
    +

    The function returns immediately. The connection may therefore still be up for some time after this call.

    +

    Gun will not attempt to reconnect once graceful shutdown has been initiated.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    +

    Return value

    +

    The atom ok is returned.

    +

    Changelog

    +
    • 2.0: Function introduced. +
    • +
    +

    Examples

    +
    Gracefully shutdown the connection
    +
    +
    ok = gun:shutdown(ConnPid).
    +
    +

    See also

    +

    gun(3), gun:open(3), gun:open_unix(3), gun:close(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.stream_info/index.html b/docs/en/gun/2.0/manual/gun.stream_info/index.html new file mode 100644 index 00000000..183d9ade --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.stream_info/index.html @@ -0,0 +1,199 @@ + + + + + + + + + + Nine Nines: gun:stream_info(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:stream_info(3)

    + +

    Name

    +

    gun:stream_info - Obtain information about a stream

    +

    Description

    +
    +
    stream_info(ConnPid, StreamRef) -> {ok, undefined | Info} | {error, not_connected}
    +
    +ConnPid :: pid()
    +StreamRef :: reference()
    +Info :: #{
    +    ref => reference(),
    +    reply_to => pid(),
    +    state => running | stopping
    +}
    +
    +

    Obtain information about a stream.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream for the original request.

    +
    +
    +

    Return value

    +

    A map is returned containing various informations about the stream.

    +

    Changelog

    +
    • 2.0: Function introduced. +
    • +
    +

    Examples

    +
    Obtain information about a stream
    +
    +
    Info = gun:stream_info(ConnPid, StreamRef).
    +
    +

    See also

    +

    gun(3), gun:get(3), gun:head(3), gun:options(3), gun:patch(3), gun:post(3), gun:put(3), gun:delete(3), gun:headers(3), gun:request(3), gun:cancel(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.update_flow/index.html b/docs/en/gun/2.0/manual/gun.update_flow/index.html new file mode 100644 index 00000000..52f113eb --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.update_flow/index.html @@ -0,0 +1,200 @@ + + + + + + + + + + Nine Nines: gun:update_flow(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:update_flow(3)

    + +

    Name

    +

    gun:update_flow - Update a stream's flow control value

    +

    Description

    +
    +
    update_flow(ConnPid, StreamRef, Flow) -> ok
    +
    +ConnPid   :: pid()
    +StreamRef :: reference()
    +Flow      :: pos_integer()
    +
    +

    Update a stream's flow control value.

    +

    The flow value can only ever be incremented.

    +

    This function does nothing for streams that have flow control disabled (which is the default).

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream for the original request.

    +
    +
    Flow
    +

    Flow control value increment.

    +
    +
    +

    Return value

    +

    The atom ok is returned.

    +

    Changelog

    +
    • 2.0: Function introduced. +
    • +
    +

    Examples

    +
    Update a stream's flow control value
    +
    +
    gun:update_flow(ConnPid, StreamRef, 10).
    +
    +

    See also

    +

    gun(3), gun:get(3), gun:head(3), gun:options(3), gun:patch(3), gun:post(3), gun:put(3), gun:delete(3), gun:headers(3), gun:request(3), gun:ws_upgrade(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.ws_send/index.html b/docs/en/gun/2.0/manual/gun.ws_send/index.html new file mode 100644 index 00000000..c1677abe --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.ws_send/index.html @@ -0,0 +1,208 @@ + + + + + + + + + + Nine Nines: gun:ws_send(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:ws_send(3)

    + +

    Name

    +

    gun:ws_send - Send Websocket frames

    +

    Description

    +
    +
    ws_send(ConnPid, Frames) -> ok
    +
    +ConnPid :: pid()
    +Frames  :: Frame | [Frame]
    +Frame   :: close | ping | pong
    +         | {text | binary | close | ping | pong, iodata()}
    +         | {close, non_neg_integer(), iodata()}
    +
    +

    Send Websocket frames.

    +

    The connection must first be upgraded to Websocket using the function gun:ws_upgrade(3).

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Frames
    +

    One or more Websocket frame(s).

    +
    +
    +

    Return value

    +

    The atom ok is returned.

    +

    Changelog

    +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Send a single frame
    +
    +
    gun:ws_send(ConnPid, {text, <<"Hello world!">>}).
    +
    +
    Send many frames including a close frame
    +
    +
    gun:ws_send(ConnPid, [
    +    {text, <<"See you later, world!">>},
    +    close
    +]).
    +
    +

    See also

    +

    gun(3), gun:ws_upgrade(3), gun_upgrade(3), gun_ws(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun.ws_upgrade/index.html b/docs/en/gun/2.0/manual/gun.ws_upgrade/index.html new file mode 100644 index 00000000..3121f8c0 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun.ws_upgrade/index.html @@ -0,0 +1,231 @@ + + + + + + + + + + Nine Nines: gun:ws_upgrade(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun:ws_upgrade(3)

    + +

    Name

    +

    gun:ws_upgrade - Upgrade to Websocket

    +

    Description

    +
    +
    ws_upgrade(ConnPid, Path)
    +    -> ws_upgrade(ConnPid, Path, [])
    +
    +ws_upgrade(ConnPid, Path, Headers)
    +    -> StreamRef
    +
    +ws_upgrade(ConnPid, Path, Headers, WsOpts)
    +    -> StreamRef
    +
    +ConnPid   :: pid()
    +Path      :: iodata()
    +Headers   :: gun:req_headers()
    +WsOpts    :: gun:ws_opts
    +StreamRef :: reference()
    +
    +

    Upgrade to Websocket.

    +

    The behavior of this function depends on the protocol selected.

    +

    HTTP/1.1 cannot handle Websocket and HTTP requests concurrently. The upgrade, if successful, will result in the complete takeover of the connection. Any subsequent HTTP requests will be rejected.

    +

    Gun does not currently support Websocket over HTTP/2.

    +

    By default Gun will take the Websocket options from the connection's ws_opts.

    +

    Arguments

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Path
    +

    Path to the resource.

    +
    +
    Headers
    +

    Additional request headers.

    +
    +
    WsOpts
    +

    Configuration for the Websocket protocol.

    +
    +
    +

    Return value

    +

    A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.

    +

    Changelog

    +
    • 1.0: Function introduced. +
    • +
    +

    Examples

    +
    Upgrade to Websocket
    +
    +
    StreamRef = gun:ws_upgrade(ConnPid, "/ws", [
    +    {<<"sec-websocket-protocol">>, <<"chat">>}
    +]).
    +receive
    +    {gun_upgrade, ConnPid, StreamRef, [<<"websocket">>], _} ->
    +        ok
    +after 5000 ->
    +    error(timeout)
    +end.
    +
    +
    Upgrade to Websocket with different options
    +
    +
    StreamRef = gun:ws_upgrade(ConnPid, "/ws", [], #{
    +    compress => false
    +}).
    +
    +

    See also

    +

    gun(3), gun:ws_send(3), gun_upgrade(3), gun_ws(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun/index.html b/docs/en/gun/2.0/manual/gun/index.html new file mode 100644 index 00000000..ea092254 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun/index.html @@ -0,0 +1,586 @@ + + + + + + + + + + Nine Nines: gun(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun(3)

    + +

    Name

    +

    gun - Asynchronous HTTP client

    +

    Description

    +

    The gun module provides an asynchronous interface for connecting and communicating with Web servers over HTTP, HTTP/2 or Websocket.

    +

    Exports

    +

    Connection:

    + +

    Requests:

    + +

    Proxies:

    + +

    Messages:

    + +

    Streams:

    + +

    Websocket:

    + +

    Messages

    +

    Gun will inform the calling process of events asynchronously by sending any of the following messages:

    +

    Connection:

    + +

    Responses:

    + +

    Websocket:

    + +

    The response messages will be sent to the process that opened the connection by default. The reply_to request option can be used to redirect request-specific messages to a different process.

    +

    Types

    +

    connect_destination()

    +
    +
    connect_destination() :: #{
    +    host      := inet:hostname() | inet:ip_address(),
    +    port      := inet:port_number(),
    +
    +    username  => iodata(),
    +    password  => iodata(),
    +    protocols => protocols(),
    +    transport => tcp | tls,
    +
    +    tls_opts              => [ssl:tls_client_option()],
    +    tls_handshake_timeout => timeout()
    +}
    +
    +

    Destination of a CONNECT request.

    +

    The default value, if any, is given next to the option name:

    +
    host, port
    +

    Destination hostname and port number. Mandatory.

    +

    Upon successful completion of the CONNECT request, Gun will begin using these as the host and port of the origin server for subsequent requests.

    +
    +
    username, password
    +

    Proxy authorization credentials. They are only sent when both options are provided.

    +
    +
    protocols - see below
    +

    Ordered list of preferred protocols. Please refer to the protocols() type documentation for details.

    +

    Defaults to [http] when the transport is tcp, and [http2, http] when the transport is tls.

    +
    +
    transport (tcp)
    +

    Transport that will be used for tunneled requests.

    +
    +
    tls_opts ([])
    +

    Options to use for tunneled TLS connections.

    +
    +
    tls_handshake_timeout (infinity)
    +

    Handshake timeout for tunneled TLS connections.

    +
    +
    +

    http_opts()

    +
    +
    http_opts() :: #{
    +    closing_timeout       => timeout(),
    +    flow                  => pos_integer(),
    +    keepalive             => timeout(),
    +    transform_header_name => fun((binary()) -> binary()),
    +    version               => 'HTTP/1.1' | 'HTTP/1.0'
    +}
    +
    +

    Configuration for the HTTP protocol.

    +

    The default value is given next to the option name:

    + +
    closing_timeout (15000)
    +

    Time to wait before brutally closing the connection when a graceful shutdown was requested via a call to gun:shutdown(3).

    +
    +
    flow - see below
    +

    The initial flow control value for all HTTP/1.1 streams. By default flow control is disabled.

    +
    +
    keepalive (infinity)
    +

    Time between pings in milliseconds. Since the HTTP protocol has no standardized way to ping the server, Gun will simply send an empty line when the connection is idle. Gun only makes a best effort here as servers usually have configurable limits to drop idle connections. Disabled by default due to potential incompatibilities.

    +
    +
    transform_header_name - see below
    +

    A function that will be applied to all header names before they are sent to the server. Gun assumes that all header names are in lower case. This function is useful if you, for example, need to re-case header names in the event that the server incorrectly considers the case of header names to be significant.

    +
    +
    version ('HTTP/1.1')
    +

    HTTP version to use.

    +
    +
    +

    http2_opts()

    +
    +
    http2_opts() :: #{
    +    closing_timeout => timeout(),
    +    flow            => pos_integer(),
    +    keepalive       => timeout()
    +}
    +
    +

    Configuration for the HTTP/2 protocol.

    +

    The default value is given next to the option name:

    + +
    closing_timeout (15000)
    +

    Time to wait before brutally closing the connection when a graceful shutdown was requested either via a call to gun:shutdown(3) or by the server.

    +
    +
    flow - see below
    +

    The initial flow control value for all HTTP/2 streams. By default flow control is disabled.

    +
    +
    keepalive (5000)
    +

    Time between pings in milliseconds.

    +
    +
    + +

    opts()

    +
    +
    opts() :: #{
    +    connect_timeout       => timeout(),
    +    domain_lookup_timeout => timeout(),
    +    http_opts             => http_opts(),
    +    http2_opts            => http2_opts(),
    +    protocols             => protocols(),
    +    retry                 => non_neg_integer(),
    +    retry_fun             => fun(),
    +    retry_timeout         => pos_integer(),
    +    supervise             => boolean(),
    +    tcp_opts              => [gen_tcp:connect_option()],
    +    tls_handshake_timeout => timeout(),
    +    tls_opts              => [ssl:tls_client_option()],
    +    trace                 => boolean(),
    +    transport             => tcp | tls,
    +    ws_opts               => ws_opts()
    +}
    +
    +

    Configuration for the connection.

    +

    The default value is given next to the option name:

    +
    connect_timeout (infinity)
    +

    Connection timeout.

    +
    +
    domain_lookup_timeout (infinity)
    +

    Domain lookup timeout.

    +
    +
    http_opts (#{})
    +

    Options specific to the HTTP protocol.

    +
    +
    http2_opts (#{})
    +

    Options specific to the HTTP/2 protocol.

    +
    +
    protocols - see below
    +

    Ordered list of preferred protocols. Please refer to the protocols() type documentation for details.

    +

    Defaults to [http] when the transport is tcp, and [http2, http] when the transport is tls.

    +
    +
    retry (5)
    +

    Number of times Gun will try to reconnect on failure before giving up.

    +
    +
    retry_fun - see below
    +

    A fun that will be called before every reconnect attempt. It receives the current number of retries left and the Gun options. It returns the next number of retries left and the timeout to apply before reconnecting.

    +
    +
    +

    The default fun will remove one to the number of retries and set the timeout to the retry_timeout value.

    +

    The fun must be defined as follow:

    +
    +
    fun ((non_neg_integer(), opts()) -> #{
    +    retries => non_neg_integer(),
    +    timeout => pos_integer()
    +})
    +
    +

    The fun will never be called when the retry option is set to 0. When this function returns 0 in the retries value, Gun will do one last reconnect attempt before giving up.

    +
    retry_timeout (5000)
    +

    Time between retries in milliseconds.

    +
    +
    supervise (true)
    +

    Whether the Gun process should be started under the gun_sup supervisor. Set to false to use your own supervisor.

    +
    +
    tcp_opts ([])
    +

    TCP options used when establishing the connection.

    +
    +
    tls_handshake_timeout (infinity)
    +

    TLS handshake timeout.

    +
    +
    tls_opts ([])
    +

    TLS options used for the TLS handshake after the connection has been established, when the transport is set to tls.

    +
    +
    trace (false)
    +

    Whether to enable dbg tracing of the connection process. Should only be used during debugging.

    +
    +
    transport - see below
    +

    Whether to use TLS or plain TCP. The default varies depending on the port used. Port 443 defaults to tls. All other ports default to tcp.

    +
    +
    ws_opts (#{})
    +

    Options specific to the Websocket protocol.

    +
    +
    +

    protocols()

    +
    +
    protocols() :: http | {http, http_opts()}
    +             | http2 | {http2, http2_opts()}
    +             | socks | {socks, socks_opts()}
    +
    +

    Ordered list of preferred protocols. When the transport is tcp, this list must contain exactly one protocol. When the transport is tls, this list must contain at least one protocol and will be used to negotiate a protocol via ALPN. When the server does not support ALPN then http will be used, except when the list of preferred protocols is set to only accept socks.

    +

    Defaults to [http] when the transport is tcp, and [http2, http] when the transport is tls.

    +

    req_headers()

    +
    +
    req_headers() :: [{binary() | string() | atom(),   iodata()}]
    +               | #{binary() | string() | atom() => iodata()}
    +
    +

    Request headers.

    +

    req_opts()

    +
    +
    req_opts() :: #{
    +    flow     => pos_integer(),
    +    reply_to => pid()
    +}
    +
    +

    Configuration for a particular request.

    +

    The default value is given next to the option name:

    +
    flow - see below
    +

    The initial flow control value for the stream. By default flow control is disabled.

    +
    +
    reply_to (self())
    +

    The pid of the process that will receive the response messages.

    +
    +
    +

    socks_opts()

    +
    +
    socks_opts() :: #{
    +    host := inet:hostname() | inet:ip_address(),
    +    port := inet:port_number(),
    +
    +    auth      => [{username_password, binary(), binary()} | none],
    +    protocols => protocols(),
    +    transport => tcp | tls,
    +    version   => 5,
    +
    +    tls_opts              => [ssl:tls_client_option()],
    +    tls_handshake_timeout => timeout()
    +}
    +
    +

    Configuration for the Socks protocol.

    +

    The default value, if any, is given next to the option name:

    +
    host, port
    +

    Destination hostname and port number. Mandatory.

    +

    Upon successful completion of the Socks connection, Gun will begin using these as the host and port of the origin server for subsequent requests.

    +
    +
    auth ([none])
    +

    Authentication methods Gun advertises to the Socks proxy.

    +
    +
    protocols - see below
    +

    Ordered list of preferred protocols. Please refer to the protocols() type documentation for details.

    +

    Defaults to [http] when the transport is tcp, and [http2, http] when the transport is tls.

    +
    +
    transport (tcp)
    +

    Transport that will be used for tunneled requests.

    +
    +
    tls_opts ([])
    +

    Options to use for tunneled TLS connections.

    +
    +
    tls_handshake_timeout (infinity)
    +

    Handshake timeout for tunneled TLS connections.

    +
    +
    version (5)
    +

    Version of the Socks protocol to use.

    +
    +
    +

    ws_opts()

    +
    +
    ws_opts() :: #{
    +    closing_timeout => timeout(),
    +    compress        => boolean(),
    +    flow            => pos_integer(),
    +    keepalive       => timeout(),
    +    protocols       => [{binary(), module()}],
    +    silence_pings   => boolean()
    +}
    +
    +

    Configuration for the Websocket protocol.

    +

    The default value is given next to the option name:

    +
    closing_timeout (15000)
    +

    Time to wait before brutally closing the connection when a graceful shutdown was requested either via a call to gun:shutdown(3) or by the server.

    +
    +
    compress (false)
    +

    Whether to enable permessage-deflate compression. This does not guarantee that compression will be used as it is the server that ultimately decides. Defaults to false.

    +
    +
    flow - see below
    +

    The initial flow control value for the Websocket connection. By default flow control is disabled.

    +
    +
    keepalive (5000)
    +

    Time between pings in milliseconds.

    +
    +
    protocols ([])
    +

    A non-empty list enables Websocket protocol negotiation. The list of protocols will be sent in the sec-websocket-protocol request header. The handler module interface is currently undocumented and must be set to gun_ws_h.

    +
    +
    silence_pings (true)
    +

    Whether the ping and pong frames should be sent to the user. In all cases Gun will automatically send a pong frame back when receiving a ping.

    +
    +
    + +

    Changelog

    +
    • 2.0: The types protocols() and socks_opts() have been added. Support for the Socks protocol has been added in every places where protocol selection is available. In addition it is now possible to specify separate HTTP options for the CONNECT proxy and the origin server. +
    • +
    • 2.0: The connect_timeout option has been split into three options: domain_lookup_timeout, connect_timeout and when applicable tls_handshake_timeout. +
    • +
    • 2.0: The option retry_fun was added. It can be used to implement different reconnect strategies. +
    • +
    • 2.0: The transport_opts option has been split into two options: tcp_opts and tls_opts. +
    • +
    • 2.0: Function gun:update_flow/3 introduced. The flow option was added to request options and HTTP/1.1, HTTP/2 and Websocket options as well. +
    • +
    • 2.0: Introduce the type req_headers() and extend the types accepted for header names for greater interoperability. Header names are automatically lowercased as well. +
    • +
    • 2.0: Function gun:headers/4,5 introduced. +
    • +
    • 2.0: The keepalive option is now set to infinity by default for the HTTP/1.1 protocol, disabling it. +
    • +
    • 2.0: Websocket options keepalive and silence_pings introduced. +
    • +
    • 1.3: Add the CONNECT destination's protocols option and deprecate the previously introduced protocol option. +
    • +
    • 1.2: Introduce the type connect_destination(). +
    • +
    +

    See also

    +

    gun(7)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun_app/index.html b/docs/en/gun/2.0/manual/gun_app/index.html new file mode 100644 index 00000000..5c160cb1 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun_app/index.html @@ -0,0 +1,183 @@ + + + + + + + + + + Nine Nines: gun(7) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun(7)

    + +

    Name

    +

    gun - HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP

    +

    Description

    +

    Gun is an HTTP client for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.

    +

    Gun aims to provide an easy to use, asynchronous and always-connected client. It maintains a permanent connection to the server and reconnects automatically when necessary.

    +

    Modules

    +
    • gun(3) - Asynchronous HTTP client +
    • +
    +

    Dependencies

    +
    • cowlib(7) - Support library for manipulating Web protocols +
    • +
    • ssl - Secure communication over sockets +
    • +
    +

    All these applications must be started before the gun application. To start Gun and all dependencies at once:

    +
    +
    {ok, _} = application:ensure_all_started(gun).
    +
    +

    Environment

    +

    The gun application does not define any application environment configuration parameters.

    +

    See also

    +

    cowlib(7)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun_data/index.html b/docs/en/gun/2.0/manual/gun_data/index.html new file mode 100644 index 00000000..43b2bf95 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun_data/index.html @@ -0,0 +1,207 @@ + + + + + + + + + + Nine Nines: gun_data(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun_data(3)

    + +

    Name

    +

    gun_data - Response body

    +

    Description

    +
    +
    {gun_data, ConnPid, StreamRef, IsFin, Data}
    +
    +ConnPid   :: pid()
    +StreamRef :: reference()
    +IsFin     :: fin | nofin
    +Data      :: binary()
    +
    +

    Response body.

    +

    This message informs the relevant process that the server sent a all or part of the body for the response to the original request.

    +

    A data message is always preceded by a response message.

    +

    The response body may be terminated either by a data message with the flag fin set or by a gun_trailers(3) message.

    +

    Elements

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream for the original request.

    +
    +
    IsFin
    +

    Whether this message terminates the response.

    +
    +
    Data
    +

    All or part of the response body.

    +
    +
    +

    Changelog

    +
    • 1.0: Message introduced. +
    • +
    +

    Examples

    +
    Receive a gun_data message in a gen_server
    +
    +
    handle_info({gun_data, ConnPid, _StreamRef,
    +             _IsFin, _Data},
    +            State=#state{conn_pid=ConnPid}) ->
    +    %% Do something.
    +    {noreply, State}.
    +
    +

    See also

    +

    gun(3), gun:get(3), gun:head(3), gun:patch(3), gun:post(3), gun:put(3), gun:delete(3), gun:options(3), gun:headers(3), gun:request(3), gun_response(3), gun_trailers(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun_down/index.html b/docs/en/gun/2.0/manual/gun_down/index.html new file mode 100644 index 00000000..28deb588 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun_down/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + Nine Nines: gun_down(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun_down(3)

    + +

    Name

    +

    gun_down - The connection is down

    +

    Description

    +
    +
    {gun_down, ConnPid, Protocol, Reason, KilledStreams}
    +
    +ConnPid            :: pid()
    +Protocol           :: http | http2 | socks | ws
    +Reason             :: any()
    +KilledStreams      :: [reference()]
    +
    +

    The connection is down.

    +

    This message informs the owner process that the connection was lost. Depending on the retry and retry_timeout options Gun may automatically attempt to reconnect.

    +

    When the connection goes back up, Gun will not attempt to retry requests. It will also not upgrade to Websocket automatically if that was the protocol in use when the connection was lost.

    +

    Elements

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Protocol
    +

    The protocol that was selected for this connection or upgraded to during the course of the connection.

    +
    +
    Reason
    +

    The reason for the loss of the connection.

    +

    It is present for debugging purposes only. You should not rely on this value to perform operations programmatically.

    +
    +
    KilledStreams
    +

    List of streams that have been brutally terminated.

    +

    They are active streams that did not complete before the closing of the connection. Whether they can be retried safely depends on the protocol used and the idempotence property of the requests.

    +
    +
    +

    Changelog

    +
    • 2.0: The last element of the message's tuple, UnprocessedStreams has been removed. +
    • +
    • 1.0: Message introduced. +
    • +
    +

    Examples

    +
    Receive a gun_down message in a gen_server
    +
    +
    handle_info({gun_down, ConnPid, _Protocol, _Reason, _Killed},
    +            State=#state{conn_pid=ConnPid}) ->
    +    %% Do something.
    +    {noreply, State}.
    +
    +

    See also

    +

    gun(3), gun:open(3), gun:open_unix(3), gun_up(3), gun_socks_up(3), gun_error(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun_error/index.html b/docs/en/gun/2.0/manual/gun_error/index.html new file mode 100644 index 00000000..bdd633f9 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun_error/index.html @@ -0,0 +1,206 @@ + + + + + + + + + + Nine Nines: gun_error(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun_error(3)

    + +

    Name

    +

    gun_error - Stream or connection-wide error

    +

    Description

    +
    +
    {gun_error, ConnPid, StreamRef, Reason}
    +{gun_error, ConnPid, Reason}
    +
    +ConnPid   :: pid()
    +StreamRef :: reference()
    +Reason    :: any()
    +
    +

    Stream or connection-wide error.

    +

    These messages inform the relevant process that an error occurred. A reference is given when the error pertains to a specific stream. Connection-wide errors do not imply that the connection is no longer usable, they are used for all errors that are not specific to a stream.

    +

    Elements

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream that resulted in an error.

    +
    +
    Reason
    +

    The reason for the error.

    +

    It is present for debugging purposes only. You should not rely on this value to perform operations programmatically.

    +
    +
    +

    Changelog

    +
    • 1.0: Message introduced. +
    • +
    +

    Examples

    +
    Receive a gun_error message in a gen_server
    +
    +
    handle_info({gun_error, ConnPid, _Reason},
    +            State=#state{conn_pid=ConnPid}) ->
    +    %% Do something.
    +    {noreply, State};
    +handle_info({gun_error, ConnPid, _StreamRef, _Reason},
    +            State=#state{conn_pid=ConnPid}) ->
    +    %% Do something.
    +    {noreply, State}.
    +
    +

    See also

    +

    gun(3), gun_up(3), gun_socks_up(3), gun_down(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun_inform/index.html b/docs/en/gun/2.0/manual/gun_inform/index.html new file mode 100644 index 00000000..3de67dbd --- /dev/null +++ b/docs/en/gun/2.0/manual/gun_inform/index.html @@ -0,0 +1,206 @@ + + + + + + + + + + Nine Nines: gun_inform(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun_inform(3)

    + +

    Name

    +

    gun_inform - Informational response

    +

    Description

    +
    +
    {gun_inform, ConnPid, StreamRef, Status, Headers}
    +
    +ConnPid   :: pid()
    +StreamRef :: reference()
    +Status    :: 100..199
    +Headers   :: [{binary(), binary()}]
    +
    +

    Informational response.

    +

    This message informs the relevant process that the server sent an informational response to the original request.

    +

    Informational responses are only intermediate responses and provide no guarantees as to what the final response will be. An informational response always precedes the response to the original request.

    +

    Elements

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream for the original request.

    +
    +
    Status
    +

    Status code for the informational response.

    +
    +
    Headers
    +

    Headers sent with the informational response.

    +
    +
    +

    Changelog

    +
    • 1.0: Message introduced. +
    • +
    +

    Examples

    +
    Receive a gun_inform message in a gen_server
    +
    +
    handle_info({gun_inform, ConnPid, _StreamRef,
    +             _Status, _Headers},
    +            State=#state{conn_pid=ConnPid}) ->
    +    %% Do something.
    +    {noreply, State}.
    +
    +

    See also

    +

    gun(3), gun:get(3), gun:patch(3), gun:post(3), gun:put(3), gun_response(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun_push/index.html b/docs/en/gun/2.0/manual/gun_push/index.html new file mode 100644 index 00000000..5acd341c --- /dev/null +++ b/docs/en/gun/2.0/manual/gun_push/index.html @@ -0,0 +1,226 @@ + + + + + + + + + + Nine Nines: gun_push(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun_push(3)

    + +

    Name

    +

    gun_push - Server-initiated push

    +

    Description

    +
    +
    {gun_push, ConnPid, StreamRef, NewStreamRef, Method, URI, Headers}
    +
    +ConnPid      :: pid()
    +StreamRef    :: reference()
    +NewStreamRef :: reference()
    +Method       :: binary()
    +URI          :: binary()
    +Headers      :: [{binary(), binary()}]
    +
    +

    Server-initiated push.

    +

    This message informs the relevant process that the server is pushing a resource related to the effective target URI of the original request.

    +

    A server-initiated push message always precedes the response to the original request.

    +

    This message will not be sent when using the HTTP/1.1 protocol because it lacks the concept of server-initiated push.

    +

    Elements

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream for the original request.

    +
    +
    NewStreamRef
    +

    Identifier of the stream being pushed.

    +
    +
    Method
    +

    Method of the equivalent HTTP request.

    +
    +
    URI
    +

    URI of the resource being pushed.

    +
    +
    Headers
    +

    Headers of the equivalent HTTP request.

    +
    +
    +

    Changelog

    +
    • 1.0: Message introduced. +
    • +
    +

    Examples

    +
    Receive a gun_push message in a gen_server
    +
    +
    handle_info({gun_push, ConnPid, _StreamRef,
    +             _NewStreamRef, _Method, _URI, _Headers},
    +            State=#state{conn_pid=ConnPid}) ->
    +    %% Do something.
    +    {noreply, State}.
    +
    +
    Cancel an unwanted push
    +
    +
    handle_info({gun_push, ConnPid, _StreamRef,
    +             NewStreamRef, _Method, _URI, _Headers},
    +            State=#state{conn_pid=ConnPid}) ->
    +    gun:cancel(ConnPid, NewStreamRef),
    +    {noreply, State}.
    +
    +

    See also

    +

    gun(3), gun:get(3), gun:cancel(3), gun_response(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun_response/index.html b/docs/en/gun/2.0/manual/gun_response/index.html new file mode 100644 index 00000000..5a06b764 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun_response/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + Nine Nines: gun_response(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun_response(3)

    + +

    Name

    +

    gun_response - Response

    +

    Description

    +
    +
    {gun_response, ConnPid, StreamRef, IsFin, Status, Headers}
    +
    +ConnPid   :: pid()
    +StreamRef :: reference()
    +IsFin     :: fin | nofin
    +Status    :: non_neg_integer()
    +Headers   :: [{binary(), binary()}]
    +
    +

    Response.

    +

    This message informs the relevant process that the server sent a response to the original request.

    +

    Elements

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream for the original request.

    +
    +
    IsFin
    +

    Whether this message terminates the response.

    +
    +
    Status
    +

    Status code for the response.

    +
    +
    Headers
    +

    Headers sent with the response.

    +
    +
    +

    Changelog

    +
    • 1.0: Message introduced. +
    • +
    +

    Examples

    +
    Receive a gun_response message in a gen_server
    +
    +
    handle_info({gun_response, ConnPid, _StreamRef,
    +             _IsFin, _Status, _Headers},
    +            State=#state{conn_pid=ConnPid}) ->
    +    %% Do something.
    +    {noreply, State}.
    +
    +

    See also

    +

    gun(3), gun:get(3), gun:head(3), gun:patch(3), gun:post(3), gun:put(3), gun:delete(3), gun:options(3), gun:headers(3), gun:request(3), gun_inform(3), gun_push(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun_socks_up/index.html b/docs/en/gun/2.0/manual/gun_socks_up/index.html new file mode 100644 index 00000000..6fcbc69b --- /dev/null +++ b/docs/en/gun/2.0/manual/gun_socks_up/index.html @@ -0,0 +1,198 @@ + + + + + + + + + + Nine Nines: gun_socks_up(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun_socks_up(3)

    + +

    Name

    +

    gun_socks_up - The Socks connection is up

    +

    Description

    +
    +
    {gun_socks_up, ConnPid, Protocol}
    +
    +ConnPid  :: pid()
    +Protocol :: http | http2 | socks
    +
    +

    The Socks connection is up.

    +

    This message informs the owner/calling process that the connection completed through the configured Socks proxy.

    +

    If Gun is configured to connect to another Socks server, then the connection is not usable yet. One or more gun_socks_up(3) messages will follow.

    +

    Otherwise, Gun will start processing the messages it received while waiting for the connection to be up. If this is a reconnection, then this may not be desirable for all requests. Those requests should be cancelled when the connection goes down, and any subsequent messages ignored.

    +

    Elements

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Protocol
    +

    The protocol selected for this connection. It can be used to determine the capabilities of the server.

    +
    +
    +

    Changelog

    +
    • 2.0: Message introduced. +
    • +
    +

    Examples

    +
    Receive a gun_socks_up message in a gen_server
    +
    +
    handle_info({gun_socks_up, ConnPid, _Protocol},
    +            State=#state{conn_pid=ConnPid}) ->
    +    %% Do something.
    +    {noreply, State}.
    +
    +

    See also

    +

    gun(3), gun:open(3), gun:open_unix(3), gun:await_up(3), gun_up(3), gun_down(3), gun_error(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun_trailers/index.html b/docs/en/gun/2.0/manual/gun_trailers/index.html new file mode 100644 index 00000000..dc3bc169 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun_trailers/index.html @@ -0,0 +1,201 @@ + + + + + + + + + + Nine Nines: gun_trailers(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun_trailers(3)

    + +

    Name

    +

    gun_trailers - Response trailers

    +

    Description

    +
    +
    {gun_trailers, ConnPid, StreamRef, Headers}
    +
    +ConnPid   :: pid()
    +StreamRef :: reference()
    +Headers   :: [{binary(), binary()}]
    +
    +

    Response trailers.

    +

    This message informs the relevant process that the server sent response trailers for the response to the original request.

    +

    A trailers message terminates the response.

    +

    Elements

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream for the original request.

    +
    +
    Headers
    +

    Trailing headers sent after the response body.

    +
    +
    +

    Changelog

    +
    • 1.0: Message introduced. +
    • +
    +

    Examples

    +
    Receive a gun_trailers message in a gen_server
    +
    +
    handle_info({gun_trailers, ConnPid, _StreamRef, _Headers},
    +            State=#state{conn_pid=ConnPid}) ->
    +    %% Do something.
    +    {noreply, State}.
    +
    +

    See also

    +

    gun(3), gun:get(3), gun:head(3), gun:patch(3), gun:post(3), gun:put(3), gun:delete(3), gun:options(3), gun:headers(3), gun:request(3), gun_response(3), gun_data(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun_up/index.html b/docs/en/gun/2.0/manual/gun_up/index.html new file mode 100644 index 00000000..3b670cc4 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun_up/index.html @@ -0,0 +1,198 @@ + + + + + + + + + + Nine Nines: gun_up(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun_up(3)

    + +

    Name

    +

    gun_up - The connection is up

    +

    Description

    +
    +
    {gun_up, ConnPid, Protocol}
    +
    +ConnPid  :: pid()
    +Protocol :: http | http2 | socks
    +
    +

    The connection is up.

    +

    This message informs the owner process that the connection or reconnection completed.

    +

    If Gun is configured to connect to a Socks server, then the connection is not usable yet. One or more gun_socks_up(3) messages will follow.

    +

    Otherwise, Gun will start processing the messages it received while waiting for the connection to be up. If this is a reconnection, then this may not be desirable for all requests. Those requests should be cancelled when the connection goes down, and any subsequent messages ignored.

    +

    Elements

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    Protocol
    +

    The protocol selected for this connection. It can be used to determine the capabilities of the server.

    +
    +
    +

    Changelog

    +
    • 1.0: Message introduced. +
    • +
    +

    Examples

    +
    Receive a gun_up message in a gen_server
    +
    +
    handle_info({gun_up, ConnPid, _Protocol},
    +            State=#state{conn_pid=ConnPid}) ->
    +    %% Do something.
    +    {noreply, State}.
    +
    +

    See also

    +

    gun(3), gun:open(3), gun:open_unix(3), gun:await_up(3), gun_socks_up(3), gun_down(3), gun_error(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun_upgrade/index.html b/docs/en/gun/2.0/manual/gun_upgrade/index.html new file mode 100644 index 00000000..36c8a660 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun_upgrade/index.html @@ -0,0 +1,207 @@ + + + + + + + + + + Nine Nines: gun_upgrade(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun_upgrade(3)

    + +

    Name

    +

    gun_upgrade - Successful protocol upgrade

    +

    Description

    +
    +
    {gun_upgrade, ConnPid, StreamRef, Protocols, Headers}
    +
    +ConnPid   :: pid()
    +StreamRef :: reference()
    +Protocols :: [<<"websocket">>]
    +Headers   :: [{binary(), binary()}]
    +
    +

    Successful protocol upgrade.

    +

    This message informs the relevant process that the server accepted to upgrade to one or more protocols given in the original request.

    +

    The exact semantics of this message depend on the original protocol. HTTP/1.1 upgrades apply to the entire connection. HTTP/2 uses a different mechanism which allows switching specific streams to a different protocol.

    +

    Gun currently only supports upgrading HTTP/1.1 connections to the Websocket protocol.

    +

    Elements

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream that resulted in an upgrade.

    +
    +
    Protocols
    +

    List of protocols this stream was upgraded to.

    +
    +
    Headers
    +

    Headers sent with the upgrade response.

    +
    +
    +

    Changelog

    +
    • 1.0: Message introduced. +
    • +
    +

    Examples

    +
    Receive a gun_upgrade message in a gen_server
    +
    +
    handle_info({gun_upgrade, ConnPid, _StreamRef,
    +             _Protocols, _Headers},
    +            State=#state{conn_pid=ConnPid}) ->
    +    %% Do something.
    +    {noreply, State}.
    +
    +

    See also

    +

    gun(3), gun:ws_upgrade(3), gun:ws_send(3), gun_ws(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/gun_ws/index.html b/docs/en/gun/2.0/manual/gun_ws/index.html new file mode 100644 index 00000000..3f070499 --- /dev/null +++ b/docs/en/gun/2.0/manual/gun_ws/index.html @@ -0,0 +1,206 @@ + + + + + + + + + + Nine Nines: gun_ws(3) + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    gun_ws(3)

    + +

    Name

    +

    gun_ws - Websocket frame

    +

    Description

    +
    +
    {gun_ws, ConnPid, StreamRef, Frame}
    +
    +ConnPid   :: pid()
    +StreamRef :: reference()
    +Frame     :: close | ping | pong
    +           | {text | binary | close, binary()}
    +           | {close, non_neg_integer(), binary()}
    +           | {ping | pong, binary()}
    +
    +

    Websocket frame.

    +

    This message informs the relevant process that the server sent the enclosed frame.

    +

    This message can only be sent on streams that were upgraded to the Websocket protocol.

    +

    Elements

    +
    ConnPid
    +

    The pid of the Gun connection process.

    +
    +
    StreamRef
    +

    Identifier of the stream that was upgraded to Websocket.

    +
    +
    Frame
    +

    The Websocket frame in question.

    +
    +
    +

    Changelog

    +
    • 2.0: Depending on the option silence_pings, ping and pong frames may be sent as well. +
    • +
    • 1.0: Message introduced. +
    • +
    +

    Examples

    +
    Receive a gun_ws message in a gen_server
    +
    +
    handle_info({gun_ws, ConnPid, _StreamRef, _Frame},
    +            State=#state{conn_pid=ConnPid}) ->
    +    %% Do something.
    +    {noreply, State}.
    +
    +

    See also

    +

    gun(3), gun:ws_upgrade(3), gun:ws_send(3), gun_upgrade(3)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/en/gun/2.0/manual/index.html b/docs/en/gun/2.0/manual/index.html new file mode 100644 index 00000000..7ba8d0db --- /dev/null +++ b/docs/en/gun/2.0/manual/index.html @@ -0,0 +1,183 @@ + + + + + + + + + + Nine Nines: Gun Function Reference + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +

    Gun Function Reference

    + +

    Name

    +

    gun - HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP

    +

    Description

    +

    Gun is an HTTP client for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.

    +

    Gun aims to provide an easy to use, asynchronous and always-connected client. It maintains a permanent connection to the server and reconnects automatically when necessary.

    +

    Modules

    +
    • gun(3) - Asynchronous HTTP client +
    • +
    +

    Dependencies

    +
    • cowlib(7) - Support library for manipulating Web protocols +
    • +
    • ssl - Secure communication over sockets +
    • +
    +

    All these applications must be started before the gun application. To start Gun and all dependencies at once:

    +
    +
    {ok, _} = application:ensure_all_started(gun).
    +
    +

    Environment

    +

    The gun application does not define any application environment configuration parameters.

    +

    See also

    +

    cowlib(7)

    + + + + + + +
    + +
    + + +

    + Gun + 2.0 + Function Reference + +

    + + + +

    Navigation

    + +

    Version select

    + + +

    Like my work? Donate!

    +

    Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

    +
    + + + + + + + + + +

    Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

    + + + +
    +
    +
    +
    + + + + + + + + + diff --git a/docs/index.html b/docs/index.html index 757a0288..6f24a7c9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -121,6 +121,13 @@