Giving an URL connection established through the function http.connection returns the value of a field on the header indicated through the attribute name.

 

1 http.connection.getHeaderField

<http.connection.getHeaderField name='name'>
    <http_connection /> !
</http.connection.getHeaderField>
Example

Obtain the value of the field on the header of an URL connection. The function http.connection returns an URL connection, and with http.conection.getHeaderField the value of the field Set-Cookie is read. The function println shows the content by console.

Copy
<xsql-script name='http_connection_ghf'>
    <body>
        <set name='m_cookie'>
            <http.connection.getHeaderField name='Set-Cookie'>
                <http.connection url='http://www.google.es' />
            </http.connection.getHeaderField>
        </set>

        <println><m_cookie /></println>
    </body>
</xsql-script>