2

I want to perform a hidden HTTP-GET request from MS-access, as simple as possible, without any extra libraries/components.

Just a simple declare all needed.

Has WinHttp left the building??

JMax
  • 25,301
  • 12
  • 66
  • 87
Teson
  • 6,414
  • 7
  • 42
  • 67
  • 1
    did you have a look at this thread: http://stackoverflow.com/questions/158633/how-can-i-send-an-http-post-request-to-a-server-from-excel-using-vba? – JMax Aug 31 '11 at 09:13

2 Answers2

6

Here is a great page about that.

iDevlop
  • 24,106
  • 11
  • 86
  • 141
3

Hope this helps

 Dim xhr As Object
 Dim webServiceURL As String
 Dim actionType As String
 Dim thisRequest As String
 Dim targetWord As String

 WebServiceURL = "http://services.aonaware.com/DictService/DictService.asmx/"
 actionType = "Define?word="
 targetWord = "Marketplace"
 thisRequest = webServiceURL & actionType & targetWord

 'use late binding
 Set xhr = CreateObject("Microsoft.XMLHTTP")  

 xhr.Open "GET", thisRequest, False
 xhr.Send

 If xhr.status = 200 Then
   Debug.Print xhr.responseText
   MsgBox xhr.getAllResponseHeaders
 Else
   MsgBox xhr.status & ": " & xhr.statusText
 End If

 Set xhr = Nothing
Teson
  • 6,414
  • 7
  • 42
  • 67
Adarsh Madrecha
  • 4,677
  • 9
  • 61
  • 96