Debian Codegraph @

examples/compress_response/src/toppage_h.erl

raw
1 %% Feel free to use, reuse and abuse the code in this file.
2
3 %% @doc Compress response handler.
4 -module(toppage_h).
5
6 -export([init/2]).
7
8 init(Req0, Opts) ->
9 BigBody =
10 <<"A cowboy is an animal herder who tends cattle on ranches in North America,
11 traditionally on horseback, and often performs a multitude of other ranch-
12 related tasks. The historic American cowboy of the late 19th century arose
13 from the vaquero traditions of northern Mexico and became a figure of special
14 significance and legend. A subtype, called a wrangler, specifically tends the
15 horses used to work cattle. In addition to ranch work, some cowboys work for
16 or participate in rodeos. Cowgirls, first defined as such in the late 19th
17 century, had a less-well documented historical role, but in the modern world
18 have established the ability to work at virtually identical tasks and obtained
19 considerable respect for their achievements. There are also cattle handlers
20 in many other parts of the world, particularly South America and Australia,
21 who perform work similar to the cowboy in their respective nations.\n">>,
22 Req = cowboy_req:reply(200, #{}, BigBody, Req0),
23 {ok, Req, Opts}.