[99s-extend] cowboy header

Phillips, Christopher Christopher.Phillips at turner.com
Sun Mar 17 17:27:40 CET 2013


  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 -

  {Value, Req2} = cowboy_req:header(<<"user-agent">>, Req)




From: Козлов Вячеслав <kozlov-ter at yandex.ru<mailto:kozlov-ter at yandex.ru>>
Date: Sunday, March 17, 2013 9:22 AM
To: "extend at lists.ninenines.eu<mailto:extend at lists.ninenines.eu>" <extend at lists.ninenines.eu<mailto:extend at lists.ninenines.eu>>
Subject: [99s-extend] cowboy header

Hello tell me how I can get for example http header "user-agent"?
I do so:

handle(Req, State) ->

{ok, FwdIP, Req5} = cowboy_req:header("user-agent, Req)

but in this place I get the error



--
Vjacheslav Kozlov
Engineer of AEMS
Ltd. "EER-Novomichurinsk"
--
http://www.ter-energo.ru
+79109095144 09:00-18:00 (GMT+04:00)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ninenines.eu/archives/extend/attachments/20130317/2ee0bc92/attachment.html>


More information about the Extend mailing list