cowboy_req.resp_headers.asciidoc 751 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. = cowboy_req:resp_headers(3)
  2. == Name
  3. cowboy_req:resp_headers - Access HTTP headers set for the response
  4. == Description
  5. [source,erlang]
  6. ----
  7. resp_headers(Req) -> cowboy:http_headers()
  8. Req :: cowboy_req:req()
  9. ----
  10. Return all HTTP response headers.
  11. == Arguments
  12. Req::
  13. The Req object.
  14. == Return value
  15. Headers are returned as a map with keys being lowercase
  16. binary strings, and values as binary strings.
  17. If no response headers have been added the empty map is returned.
  18. == Changelog
  19. * *2.0*: Function introduced.
  20. == Examples
  21. .Get all response headers
  22. [source,erlang]
  23. ----
  24. Headers = cowboy_req:resp_headers(Req).
  25. ----
  26. == See also
  27. link:man:cowboy_req(3)[cowboy_req(3)],
  28. link:man:cowboy_req:set_resp_headers(3)[cowboy_req:set_resp_headers(3)]