West Wind Internet and Client Tools
demo/shareware of wwipstuff/httpget
Gravatar is a globally recognized avatar based on your email address. demo/shareware of wwipstuff/httpget
  Steve Howie
  All
  Feb 23, 2021 @ 11:24am

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!

Gravatar is a globally recognized avatar based on your email address. re: demo/shareware of wwipstuff/httpget
  Steve Howie
  Steve Howie
  Feb 23, 2021 @ 01:03pm

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!

Gravatar is a globally recognized avatar based on your email address. re: demo/shareware of wwipstuff/httpget
  Steve Howie
  Steve Howie
  Feb 23, 2021 @ 01:05pm

Ah, just saw your reply - I'll go back and make sure I'm compliant with what you sent.

Thanks again!

© 1996-2024