In Fiddler I'm seeing a Redirect wit ha result code of 302. The new QueryString that was returned from the redirect is the value I'm looking for.
You can't capture the redirect with HttpGet() - it automatically redirects to the URL. There may be a WinInet flag that turns off Auto-Redirect which you can apply. In that case you could read the HTTP header from the response to figure out the location url.
By default tho, the redirect will happen automatically.
+++ Rick ---
--hm
Not sure what you're asking? You need to know the URL that you're hitting in order to use wwHTTP. So this means you might have to parse the original page and find the link that the form submission is hitting along with the query string id.
+++ Rick ---
In the following example, I hit the State of California, ABC Alcoholic Licensing system. I need to tie this data back to a local map on Google with licensing information within a neighborhood radius - to many boozers or something like that...<g>
Anyway, is it possible to get the responce url back from an HttpGet()? HttpGet returns the page but not the scripted value that came back as part of the response.
Here is my example:
oHttp = CREATEOBJECT('wwHttp')
lcLicense='447484'
oHttp.AddPostKey('q_License_Num', lcLicense)
lcResult = oHttp.HttpGet('http://www.abc.ca.gov/datport/LQSBrkDwn.asp?LQSCall=LIC')
In the above example, I started out by hitting the following URL http://www.abc.ca.gov/datport/LQSLicQuery.html. Once on the ABC License by Number web page, I need to look up a license by entering the number, in this example the number is "447484". The underlying form action is specified in the above example with the text field shown in the post key.
The problem is the HttpGet returns the resulting html page just fine but not the query string from the result. In this case the full url with the query string reads: http://www.abc.ca.gov/datport/LQSdata.asp?ID=2027361642.
In the end of the day, I want to make subsequent hits to this data by providing a link off a Google map and the only way to do this without doing an HttpGet everytime is to embed the HREF link that goes directly to the data page and for that I need the ID value (2027361642).
Any ideas how to use Wconnect to go there?
--HM
| Rick Strahl West Wind Technologies Where do you want to surf today? | Reader Version: 5.0 |
from Maui, Hawaii