I am trying to access the US Postal Service Web Tools address correction service. If you want to learn more about this service visit http://www.usps.com/webtools/address.htm
. I can do this in VB using the code below. I have been unable to figure out how to do this in VFP 8 (employer requires use of version 8). Every example in VFP I see uses a WSDL file but none is available from USPS. There simply has to be a way to send a url across the web and get a response (an xml file string) in a way that is similar to what I can do in VB. I really need the code to put in the VFP button written for me, and help understanding it. I've read enough articles on the web now. I need an example.
Dim URL As String
Dim webReq As Net.HttpWebRequest
Dim webResp As Net.HttpWebResponse
Dim respStr As String
URL = "http://testing.shippingapis.com/ShippingAPITest.dll?API=Verify&XML=
ss1>" & _
"<Address2>6406 Ivy Lane</Address2><City>Green
</State>" & _
webReq = Net.HttpWebRequest.Create(
webResp = webReq.GetResponse
respStr = New IO.StreamReader(webResp.Ge
Catch ex As Exception
e = " & ex.Message)
TextBox1.Text = respStr
NOTE: I can not actually post my id as I'm not allowed to share it per their usage policy but you can get one free if you need to. I just put "myid" in my URL where the id goes.
As for my experience I'm a pro at dos style programming in Visual Foxpro and I can do quite a bit in VB nowdays but I've never really caught on to the lingo used today so talk of things like wrappers goes right over my head. I hope someone here can help.