aboutsummaryrefslogtreecommitdiffstats
path: root/guide/req.md
blob: 70873ec9fd13492978fa4d26452a769377baba73 (plain) (blame)
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
Request object
==============

Purpose
-------

The request object is a special variable that can be used
to interact with a request, extracting information from it
or modifying it, and sending a response.

It's a special variable because it contains both immutable
and mutable state. This means that some operations performed
on the request object will always return the same result,
while others will not. For example, obtaining request headers
can be repeated safely. Obtaining the request body can only
be done once, as it is read directly from the socket.

All calls to the `cowboy_req` module will return an updated
request object. You MUST use the new request object instead
of the old one for all subsequent operations.

Request
-------

@todo Describe.

Request body
------------

@todo Describe.

Response
--------

@todo Describe.