From d2a3f2cedd7c00d0933222aed9c06b3149aa4db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 4 Apr 2018 13:13:37 +0200 Subject: Cowboy 2.3.0 --- .../manual/cowboy_req.has_resp_header/index.html | 234 +++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 docs/en/cowboy/2.3/manual/cowboy_req.has_resp_header/index.html (limited to 'docs/en/cowboy/2.3/manual/cowboy_req.has_resp_header/index.html') diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_header/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_header/index.html new file mode 100644 index 00000000..83b4928f --- /dev/null +++ b/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_header/index.html @@ -0,0 +1,234 @@ + + + + + + + + + + + + Nine Nines: cowboy_req:has_resp_header(3) + + + + + + + + + + + + + + + + +
+
+
+
+ +

cowboy_req:has_resp_header(3)

+ +
+

Name

+
+

cowboy_req:has_resp_header - Is the given response header set?

+
+
+
+

Description

+
+
+
+
has_resp_header(Name, Req :: cowboy_req:req()) -> boolean()
+
+Name :: binary()  %% lowercase; case insensitive
+

Return whether the given response header has been set.

+

The header name must be given as a lowercase binary string. +While header names are case insensitive, Cowboy requires them +to be given as lowercase to function properly.

+
+
+
+

Arguments

+
+
+
+Name +
+
+

+Header name as a lowercase binary string. +

+
+
+Req +
+
+

+The Req object. +

+
+
+
+
+
+

Return value

+
+

A boolean indicating whether the given response header has been set.

+
+
+
+

Changelog

+
+
    +
  • +

    +1.0: Function introduced. +

    +
  • +
+
+
+
+

Examples

+
+
+
Check whether the content-type header has been set
+
+
false = cowboy_req:has_resp_header(<<"content-type">>, Req0),
+Req = cowboy_req:set_resp_header(<<"content-type">>, <<"text/html">>, Req0),
+true = cowboy_req:has_resp_header(<<"content-type">>, Req).
+
+
+ + + + + + +
+ +
+ + +

+ Cowboy + 2.3 + Function Reference + +

+ + + +

Navigation

+ +

Version select

+ + +
+
+
+
+ + + + + + + + + -- cgit v1.2.3