mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Make the HTTP version type more practical
Now instead of {1, 1} we have 'HTTP/1.1', and instead of {1, 0} we have 'HTTP/1.0'. This is more efficient, easier to read in crash logs, and clearer in the code.
This commit is contained in:
parent
e0b5526f1e
commit
28186a68d0
5 changed files with 25 additions and 29 deletions
|
@ -31,7 +31,7 @@ request object.
|
|||
The following access functions are defined in `cowboy_req`:
|
||||
|
||||
* `method/1`: the request method (`<<"GET">>`, `<<"POST">>`...)
|
||||
* `version/1`: the HTTP version (`{1,0}` or `{1,1}`)
|
||||
* `version/1`: the HTTP version (`'HTTP/1.0'` or `'HTTP/1.1'`)
|
||||
* `peer/1`: the peer address and port number
|
||||
* `host/1`: the hostname requested
|
||||
* `host_info/1`: the result of the `[...]` match on the host
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue