Sending a request to a web service (1 Viewer)

geno

Registered User.
Local time
Today, 04:39
Joined
Jun 19, 2000
Messages
243
Hi,

Don't know much about web programming so I need help....
I have a client who sells parts online, the part pricing is updated through two text files which are being uploaded through FTP. After this is done I need to send a request to the web so these files are looked at.

Thanks
 

geno

Registered User.
Local time
Today, 04:39
Joined
Jun 19, 2000
Messages
243
Sharing the code that worked for me:

Dim xhr As New XMLHTTP
Dim webServiceURL As String
Dim actionType As String
Dim postData As String

http://services.aonaware.com/DictService/DictService.asmx/
actionType = ""
postData = "dictId=gcide&word=baritone"
xhr.Open "POST", webServiceURL & actionType, False
xhr.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xhr.setRequestHeader "Content-Length", Len(postData)
xhr.Send postData

If xhr.Status = 200 Then
MsgBox xhr.getAllResponseHeaders
Debug.Print xhr.responseText

Else: MsgBox xhr.Status & ": " & xhr.statusText
Debug.Print xhr.responseText

End If

Set xhr = Nothing
 

Users who are viewing this thread

Top Bottom