From 48f39402181d959cad88cb3f460210c007169f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 12 May 2021 11:13:47 +0200 Subject: Cowboy 2.9.0 --- .../manual/cow_cookie.parse_set_cookie/index.html | 195 +++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 docs/en/cowlib/2.11/manual/cow_cookie.parse_set_cookie/index.html (limited to 'docs/en/cowlib/2.11/manual/cow_cookie.parse_set_cookie/index.html') diff --git a/docs/en/cowlib/2.11/manual/cow_cookie.parse_set_cookie/index.html b/docs/en/cowlib/2.11/manual/cow_cookie.parse_set_cookie/index.html new file mode 100644 index 00000000..6bc4ff21 --- /dev/null +++ b/docs/en/cowlib/2.11/manual/cow_cookie.parse_set_cookie/index.html @@ -0,0 +1,195 @@ + + + + + + + + + + Nine Nines: cow_cookie:parse_set_cookie(3) + + + + + + + + + + + + + + + + +
+
+
+
+ +

cow_cookie:parse_set_cookie(3)

+ +

Name

+

cow_cookie:parse_set_cookie - Parse a set-cookie header

+

Description

+
+
parse_set_cookie(SetCookie :: binary())
+    -> {ok, Name, Value, Attrs} | ignore
+
+Name  :: binary()
+Value :: binary()
+Attrs :: cow_cookie:cookie_attrs()
+
+

Parse a set-cookie header.

+

Arguments

+
SetCookie
+

The set-cookie header value.

+
+
+

Return value

+

An ok tuple with the cookie name, value and attributes is returned on success.

+

An atom ignore is returned when the cookie has both an empty name and an empty value, and must be ignored.

+

Changelog

+
  • 2.9: Function introduced. +
  • +
+

Examples

+
Parse a cookie header
+
+
case cow_cookie:parse_set_cookie(SetCookieHd) of
+    {ok, Name, Value, Attrs} ->
+        cookie_engine_set_cookie(Name, Value, Attrs);
+    ignore ->
+        do_nothing()
+end.
+
+

See also

+

cow_cookie(3), cow_cookie:parse_cookie(3), cow_cookie:cookie(3), cow_cookie:setcookie(3)

+ + + + + + +
+ +
+ + +

+ Cowlib + 2.11 + Function Reference + +

+ + + +

Navigation

+ +

Version select

+ + +

Like my work? Donate!

+

Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

+
+ + + + + + + + + +

Recurring payment options are also available via GitHub Sponsors. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.

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