Shiny Language Reference

Language Reference > Web Functions


wgetcookie

string wgetcookie(web WebVar, string URL, string Name);

 

Synonyms:

string webgetcookie(web WebVar, string URL, string Name);
 
 

Returns the data stored in the specified cookie

The WGETCOOKIE statement returns the cookie data for a cookie stored in a variable of type WEB (parameter 1). Cookies are used by websites to track usage, authentication details, preferences and more. Detailed discussion of cookies and cookie usage is outside the scope of this reference.

Note: this feature is considered experimental. Please submit bug reports and feature requests as appropriate.

 

Parameters

WebVar

A variable declared as type WEB. Brass will look for the specified cookie "inside" this variable. For clarity, think of a WEB variable as an instance of a web browser.

URL

The URL of the cookie. This parameter is extremely important and has operational as well as security implications. Do not proceed unless you are confident with cookies and cookie usage.

Name

The name of the cookie to return data from.

 

 

Return Value

The data of the specified cookie, or an empty string if no cookie of the specified name for the specified URL exists.

 

Example Code

No example code available. Reading of a cookie is purely based on the requirements of the website that uses it.