Learn R Programming

polished (version 0.1.0)

get_cookie: get_cookie

Description

Get a cookie value by name from a cookie string

Usage

get_cookie(cookie_string, name)

Arguments

cookie_string

the cookie string

name

the name of the cookie

Examples

Run this code
# NOT RUN {
cookies <- "cookie_name=cookie-value; cookie_name_2=cookie-value-2; cookie_name_3=cookie-with=sign"

polished:::get_cookie(cookies, "cookie_name")
polished:::get_cookie(cookies, "cookie_name_2")
polished:::get_cookie(cookies, "cookie_name_3")

# }

Run the code above in your browser using DataLab