Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WinHttp.WinHttpRequest.5.1 - setRequestHeader

129 views
Skip to first unread message

Luiz Carlos Leonesse

unread,
May 13, 2018, 11:06:14 AM5/13/18
to
Hi, everyone. I´m new at vbscript and need some help. I have a function using WinHttp.WinHttpRequest.5.1. I need to see what i´m sending with my headers. For example:
call gXMLHTTP.setRequestHeader("Connection","keep-alive")
I need to see if "Connection" value is really "keep-alive".
How can i do this?
I try with MsgBox Connection, but don´t work.

R.Wieser

unread,
May 13, 2018, 1:48:54 PM5/13/18
to
Luiz,

> I need to see if "Connection" value is really "keep-alive".
> How can i do this?

That XMLHTTP object does not seem to expose a "getRequestHeader", so you
can't ask for a preview.

That leaves sending the request to a (small, perhaps local) webserver you
control, or to a server which will kindly return your request headers as a
HTML page. :-)

Like this one:

http://scooterlabs.com/echo

... which google came back with when I threw a quick "HTTP echo" at it. :-)

Regards,
Rudy Wieser


Evertjan.

unread,
May 13, 2018, 4:24:01 PM5/13/18
to
"R.Wieser" <add...@not.available> wrote on 13 May 2018 in
microsoft.public.scripting.vbscript:
Just make your own testKeepAlive.asp page containing only:

<% = Request.ServerVariables("HTTP_CONNECTION") %>



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
0 new messages