cowboy(7)

NAME

cowboy - Small, fast, modern HTTP server for Erlang/OTP

DESCRIPTION

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

Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.

MODULES

Functions:

    • cowboy(3) - Listener management
    • cowboy_req(3) - Request and response
    • cowboy_router(3) - Router
    • cowboy_constraints(3) - Constraints

Protocols:

    • cowboy_http(3) - HTTP/1.1
    • cowboy_http2(3) - HTTP/2
    • cowboy_websocket(3) - Websocket

Handlers:

    • cowboy_static(3) - Static file handler

Stream handlers:

    • cowboy_stream_h(3) - Default stream handler
    • cowboy_compress_h(3) - Compress stream handler
    • cowboy_decompress_h(3) - Decompress stream handler
    • cowboy_metrics_h(3) - Metrics stream handler
    • cowboy_tracer_h(3) - Tracer stream handler

Behaviors:

    • cowboy_handler(3) - Plain HTTP handlers
    • cowboy_loop(3) - Loop handlers
    • cowboy_middleware(3) - Middlewares
    • cowboy_rest(3) - REST handlers
    • cowboy_stream(3) - Stream handlers
    • cowboy_websocket(3) - Websocket handlers

Middlewares:

    • cowboy_router(3) - Router middleware
    • cowboy_handler(3) - Handler middleware

DEPENDENCIES
    • ranch(7) - Socket acceptor pool for TCP protocols
    • cowlib(7) - Support library for manipulating Web protocols
    • ssl - Secure communication over sockets
    • crypto - Crypto functions

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

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

ENVIRONMENT

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

SEE ALSO

ranch(7), cowlib(7)