-
Notifications
You must be signed in to change notification settings - Fork 66
/
http_req.hrl
40 lines (36 loc) · 1.32 KB
/
http_req.hrl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-record(http_req, {
%% Transport.
socket = undefined :: any(),
transport = undefined :: undefined | module(),
connection = keepalive :: keepalive | close,
%% Request.
pid = undefined :: pid(),
method = <<"GET">> :: binary(),
version = 'HTTP/1.1' :: cowboy:http_version(),
peer = undefined :: undefined | {inet:ip_address(), inet:port_number()},
host = undefined :: undefined | binary(),
host_info = undefined :: undefined | cowboy_router:tokens(),
port = undefined :: undefined | inet:port_number(),
path = undefined :: binary(),
path_info = undefined :: undefined | cowboy_router:tokens(),
qs = undefined :: binary(),
qs_vals = undefined :: undefined | list({binary(), binary() | true}),
bindings = undefined :: undefined | cowboy_router:bindings(),
headers = [] :: cowboy:http_headers(),
p_headers = [] :: [any()],
cookies = undefined :: undefined | [{binary(), binary()}],
meta = [] :: [{atom(), any()}],
%% Request body.
body_state,
buffer = <<>> :: binary(),
multipart = undefined :: undefined | {binary(), binary()},
%% Response.
resp_compress = false :: boolean(),
resp_state = waiting :: locked | waiting | waiting_stream
| chunks | stream | done,
resp_headers = [] :: cowboy:http_headers(),
resp_body,
%% Functions.
onresponse = undefined :: undefined | already_called
| cowboy:onresponse_fun()
}).