I'm trying out West-Wind client tools (using shareware for now) and am having trouble getting a web call result. Here's my sample code:
SET CLASSLIB TO wwipstuff additive
oIP = CREATEOBJECT("wwIPStuff")
cHTTPStr = "https://nominatim.openstreetmap.org/search?q=20+W+34th+St,New+York,NY,10001&format=json"
jResult = oIP.HTTPGet(cHTTPStr)
When I run, I get cerrormsg: Win32 API: The parameter is incorrect
I can run the string in a browser and get a valid json result. What am I missing?
Thanks in advance!
You shouldn't be using wwIPStuff
- in fact that shouldn't even work if you are using a current version.
Make sure you're using latest tools from here:
https://client-tools.west-wind.com
The relevant samples for HTTP access can be found here:
Access HTTP Content over the Web
+++ Rick ---
Looks like I found a solution with the following:
SET PROCEDURE TO wweval addi
SET CLASSLIB TO wwipstuff addi
DO wwhttp
oIP = CREATEOBJECT("wwHttp")
cAddStr = STRTRAN(ALLTRIM(address)," ","+") + "," + STRTRAN(ALLTRIM(city)," ","+") + "," + ALLTRIM(state) + "," + ALLTRIM(zip)
cHTTPStr = "https://nominatim.openstreetmap.org/search?q=" + caddstr + "&format=json"
jResult = oIP.HTTPGet(cHTTPStr)
I'm getting valid json text back, so I think I'm off and running. Is everything above still part of the client tools if I purchase that? Thanks!