Getting HTTP Request Response Headers

Monkey Forums/Monkey Programming/Getting HTTP Request Response Headers

Irvau(Posted 2015) [#1]
Is there any way to do that? The documentation for HTTP requests doesn't mention anything of the sort, as the closest that there is is "SetHeader()".
I'm trying to get a "set-cookie" header value, in case it helps.

Thanks in advance!


DruggedBunny(Posted 2015) [#2]
The example in the TcpStream class documentation shows return of the server's responses:



This part specifically:

    While Not stream.Eof()
        Local line:=stream.ReadLine()
        Print line
    Wend


Output for me is:

HTTP/1.1 301 Moved Permanently
Date: Tue, 19 May 2015 17:39:00 GMT
Server: Apache/2.4.10 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4
Location: http://www.monkey-x.com/
Content-Length: 355
Connection: close
Content-Type: text/html; charset=iso-8859-1

' [Page goes here]