handle_cookies: Extract cookies from a handle

Description Usage Arguments See Also Examples

View source: R/handle.R

Description

The handle_cookies function returns a data frame with 7 columns as specified in the netscape cookie file format.

Usage

1

Arguments

handle

a curl handle object

See Also

Other handles: handle

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
h <- new_handle()
handle_cookies(h)

# Server sets cookies
req <- curl_fetch_memory("http://httpbin.org/cookies/set?foo=123&bar=ftw", handle = h)
handle_cookies(h)

# Server deletes cookies
req <- curl_fetch_memory("http://httpbin.org/cookies/delete?foo", handle = h)
handle_cookies(h)

# Cookies will survive a reset!
handle_reset(h)
handle_cookies(h)

curl documentation built on June 23, 2021, 9:07 a.m.