Skip to content

libcURL.CookieEngine.StringValue

Andrew Lambert edited this page Nov 26, 2022 · 7 revisions

libcURL.CookieEngine.StringValue

Method Signature

 Function StringValue(Index As Integer, StringFormat As Integer = libcURL.CookieEngine.FORMAT_NETSCAPE) As String

Parameters

Name Type Comment
Index Integer The index of the cookie to get. The first cookie is at Index 0
StringFormat Integer Optional. The format of the returned string.

Return value

Returns the string value of the cookie at Index using the format specified by StringFormat. Currently supported formats are:

  • FORMAT_NETSCAPE: Netscape cookiejar, for example: .example.com[TAB]TRUE[TAB]/[TAB]FALSE[TAB]1441870730[TAB]Name[TAB]Value
  • FORMAT_HTTP: HTTP Set-Cookie header, for example: Set-Cookie: Name=Value; domain=.example.com

Either format can be passed back to libcURL by using the SetCookie method.

Remarks

If you attempt to access an Index that is not present in the list, an OutOfBoundsException will be raised. If there are no cookies in the list or the CookieEngine is not enabled, then a NilObjectException will be raised. If you specify an unknown StringFormat then an UnsupportedFormatException will be raised.

Clone this wiki locally