Giving a cookie returns the domain of the cookie inside the set of cookies for the domain of the URL connection.
1 http.connection.getCookieDomain
<http.connection.getCookieDomain>
<cookie /> !
</http.connection.getCookieDomain>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Ecookie | Cookie | Cookie of which you want to obtain the domain. |
Returns | |
---|---|
Type | Description |
string | Returns the domain of a cookie used as argument of the function insede the set of cookies for the domain of the URL. |
Example
Obtain the domain of a cookie. Through http.connection.addCookie is added a cookie to the context of the URL connection established by http.connection. Later the domain is recovered from http.connection.getCookieDomain.
Copy
<xsql-script name='http_connection_cookie_domain'> <body> <set name='m_cookie'> <http.connection.addCookie name='cookie_test' value='value_test' domain='domain_test'> <http.connection url='http://www.google.es' /> </http.connection.addCookie> </set> <println> <http.connection.getCookieDomain> <m_cookie /> </http.connection.getCookieDomain> </println> </body> </xsql-script>