| 1 |
[[introduction]] |
| 2 |
== Introduction |
| 3 |
|
| 4 |
Cowboy is a small, fast and modern HTTP server for Erlang/OTP. |
| 5 |
|
| 6 |
Cowboy aims to provide a complete xref:modern_web[modern Web stack]. |
| 7 |
This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and |
| 8 |
Webmachine-based REST. |
| 9 |
|
| 10 |
Cowboy comes with functions for introspection and tracing, enabling |
| 11 |
developers to know precisely what is happening at any time. Its modular |
| 12 |
design also easily enable developers to add instrumentation. |
| 13 |
|
| 14 |
Cowboy is a high quality project. It has a small code base, is very |
| 15 |
efficient (both in latency and memory use) and can easily be embedded |
| 16 |
in another application. |
| 17 |
|
| 18 |
Cowboy is clean Erlang code. It includes hundreds of tests and its code |
| 19 |
is fully compliant with the Dialyzer. It is also well documented and |
| 20 |
features a Function Reference, a User Guide and numerous Tutorials. |
| 21 |
|
| 22 |
=== Prerequisites |
| 23 |
|
| 24 |
Beginner Erlang knowledge is recommended for reading this guide. |
| 25 |
|
| 26 |
Knowledge of the HTTP protocol is recommended but not required, as it |
| 27 |
will be detailed throughout the guide. |
| 28 |
|
| 29 |
=== Supported platforms |
| 30 |
|
| 31 |
Cowboy is tested and supported on Linux, FreeBSD, Windows and OSX. |
| 32 |
|
| 33 |
Cowboy has been reported to work on other platforms, but we make no |
| 34 |
guarantee that the experience will be safe and smooth. You are advised |
| 35 |
to perform the necessary testing and security audits prior to deploying |
| 36 |
on other platforms. |
| 37 |
|
| 38 |
Cowboy is developed for Erlang/OTP 24.0 and newer. |
| 39 |
|
| 40 |
=== License |
| 41 |
|
| 42 |
Cowboy uses the ISC License. |
| 43 |
|
| 44 |
---- |
| 45 |
Copyright (c) 2011-2026, Loïc Hoguin <[email protected]> |
| 46 |
|
| 47 |
Permission to use, copy, modify, and/or distribute this software for any |
| 48 |
purpose with or without fee is hereby granted, provided that the above |
| 49 |
copyright notice and this permission notice appear in all copies. |
| 50 |
|
| 51 |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 52 |
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 53 |
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 54 |
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 55 |
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 56 |
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 57 |
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 58 |
---- |
| 59 |
|
| 60 |
=== Versioning |
| 61 |
|
| 62 |
Cowboy uses http://semver.org/[Semantic Versioning 2.0.0]. |
| 63 |
|
| 64 |
=== Conventions |
| 65 |
|
| 66 |
In the HTTP protocol, the method name is case sensitive. All standard |
| 67 |
method names are uppercase. |
| 68 |
|
| 69 |
Header names are case insensitive. When using HTTP/1.1, Cowboy converts |
| 70 |
all the request header names to lowercase. HTTP/2 requires clients to |
| 71 |
send them as lowercase. Any other header name is expected to be provided |
| 72 |
lowercased, including when querying information about the request or |
| 73 |
when sending responses. |
| 74 |
|
| 75 |
The same applies to any other case insensitive value. |