diff options
author | Loïc Hoguin <[email protected]> | 2018-06-02 22:44:16 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-06-02 22:44:16 +0200 |
commit | 5b810c924da242632a04a2c44772cb892aa1b7c0 (patch) | |
tree | e9ee81bd3b6aea1f9665914b8858edad377c24c7 /doc/src/manual/gun_app.asciidoc | |
parent | 04b41c3cf70aba88c1dd76e4e86c39458d817219 (diff) | |
download | gun-5b810c924da242632a04a2c44772cb892aa1b7c0.tar.gz gun-5b810c924da242632a04a2c44772cb892aa1b7c0.tar.bz2 gun-5b810c924da242632a04a2c44772cb892aa1b7c0.zip |
Revamp the manual, one page per function/message
Diffstat (limited to 'doc/src/manual/gun_app.asciidoc')
-rw-r--r-- | doc/src/manual/gun_app.asciidoc | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/doc/src/manual/gun_app.asciidoc b/doc/src/manual/gun_app.asciidoc index 219a323..606d9fb 100644 --- a/doc/src/manual/gun_app.asciidoc +++ b/doc/src/manual/gun_app.asciidoc @@ -2,23 +2,40 @@ == Name -gun - Erlang HTTP client with support for HTTP/1.1, HTTP/2 and Websocket. +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 + +* link:man:gun(3)[gun(3)] - Asynchronous HTTP client == Dependencies -The `gun` application uses the Erlang applications `ranch` -for abstracting TCP and TLS over a common interface, and -the `ssl` application for TLS support, required for HTTPS -and secure HTTP/2 support. In addition, Gun requires the `crypto` -application (a dependency of `ssl`) for Websocket. +// @todo I do not want a dependency on Ranch, remove it +* link:man:cowlib(7)[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: -These dependencies must be started for the `gun` -application to work. In an embedded environment -this means that they need to be started with the -`application:start/{1,2}` function before the `gun` -application is started. +[source,erlang] +---- +{ok, _} = application:ensure_all_started(gun). +---- == Environment The `gun` application does not define any application environment configuration parameters. + +== See also + +link:man:cowlib(7)[cowlib(7)] |