com.HTTPResponse.getServerCookies

Returns all cookies set as response from a server.

Syntax

getServerCookies(
   cookies  RECORD  )
  1. cookies defines the dynamic array of all cookies sent as a response from a server. See WSHelper variables and records for more information regarding WSServerCookiesType.

Usage

This methods returns all cookies set as response from a server, in a dynamic array. All cookies are returned, even those that have already expired.

If the method setAutoCookies() is enabled, cookies are automatically send back if they are not expired. In other words, the setAutoCookies(true) handles all cookies for you, however you can still consult them with the getServerCookies() method if needed.

If setAutoCookies(false) (the default), you must handle the cookies and not send the expired ones.

In case of error, the method throws an exception and sets the STATUS variable. Depending on the error, a human-readable description of the problem is available in the SQLCA.SQLERRM register. See Error handling in GWS calls (STATUS).

This method may raise exception -15535 if the given dynamic array is not a dynamic array of RECORD with seven (7) members as defined by WSHelper.WSServerCookiesType.