Object required error

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top