PDA

View Full Version : HTTTP Post Request Help Needed



bklocinski
12-11-2014, 01:51 PM
I have an HTTP line of code that goes to a specified URL and responses back with the requested information. Some of the URLs can only be accessed after logging onto a member site so I need to be able to log into a website with my username and password and then run the HTTP GET. I am not really sure how to incorporate the Http POST into this process. The oriURL is listed in an Excel cell. Any help or suggestions is greatly appreciated.
If ws.Cells(i, 2) <> "" Then

oriURL = Trim(ws.Cells(i, 2).Value)
Application.StatusBar = "Processing Row#" & I
j = 1
resultFound = True
targetSheetCreated = False
Do While resultFound 'And j < 3
resultFound = False
If j <> 1 Then

If (Right(oriURL, 1) = "/") Then
URL = oriURL & CStr(j)
Else
URL = oriURL & "&page=" & CStr(j)
'URL = oriURL & "/" & CStr(j)
End If
Else
URL = oriURL
End If

On Error GoTo InvalidUrl

'Call the URL and Get Requested Info
Http.Open "GET", URL, False
'MsgBox URL
Http.Send

westconn1
12-12-2014, 01:31 PM
you would need to add any hidden input values (from the page loaded after login) to your request, unless the login information can be sent in the request, these will indicate a valid login, and other information, as to what to "get"