Object required error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello i'm trying to create a WinHttp Request object but i get the error
"Object required". What libraries must i use to do this?

The code i'm using is the following:

dim HttpReq
Set HttpReq = server.CreateObject("WinHttp.WinHttpRequest.5.1")

Thanks.
 
Hi, me again.

Just spotted that your 2nd line of code dooesn't need the 'server' part.

Should read:

Set HttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")

This will create the object on your local machine. If you do want it
creating elsewhere then the line should read:

Set HttpReq = CreateObject("WinHttp.WinHttpRequest.5.1", "servername")

Cheers.

BW
 
Back
Top