<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div> Cowboy aims to use binaries, not strings, and unless there's a change in the head branch I don't have, the returned tuple has only two values, the value and the request. So it should look like something like - </div>
<div><br>
</div>
<div> {Value, Req2} = cowboy_req:header(<<"user-agent">>, Req)</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Козлов Вячеслав <<a href="mailto:kozlov-ter@yandex.ru">kozlov-ter@yandex.ru</a>><br>
<span style="font-weight:bold">Date: </span>Sunday, March 17, 2013 9:22 AM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:extend@lists.ninenines.eu">extend@lists.ninenines.eu</a>" <<a href="mailto:extend@lists.ninenines.eu">extend@lists.ninenines.eu</a>><br>
<span style="font-weight:bold">Subject: </span>[99s-extend] cowboy header<br>
</div>
<div><br>
</div>
<div>
<div>
<div>Hello tell me how I can get for example http header "user-agent"?</div>
<div>I do so:</div>
<div> </div>
<div>handle(Req, State) -></div>
<div> </div>
<div>{ok, FwdIP, Req5} = cowboy_req:header("user-agent, Req)</div>
<div> </div>
<div>but in this place I get the error</div>
<div> </div>
<div> </div>
<div> </div>
<div>--</div>
<div>Vjacheslav Kozlov</div>
<div>Engineer of AEMS</div>
<div>Ltd. "EER-Novomichurinsk"</div>
<div>--</div>
<div><a href="http://www.ter-energo.ru">http://www.ter-energo.ru</a></div>
<div>+79109095144 09:00-18:00 (GMT+04:00)</div>
</div>
</div>
</span>
</body>
</html>