Linking to a web service

new BookmarkLockedFalling
telbourn7
New Member
*

telbourn7 Avatar

Posts: 20Male

StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
telbourn7
New Member
*

telbourn7 Avatar

Posts: 20Male

Carl Gundel - admin
Administrator
*****

Carl Gundel - admin Avatar

Posts: 550

Post by Carl Gundel - admin on Dec 28, 2008 14:27:47 GMT -5

Run BASIC can POST to another server. Try this example:
[start]
url$ = "http://www.house.gov/htbin/wrep_findrep"
properties$ = "state=MAMassachusetts&zip=01721&zip4=1238"
print "URL: ";
textbox #url, url,ドル 40
print
print "Properties: ";
textbox #props, properties,ドル 40
print
button #post, "Post now", [doPost]
print
wait

[doPost]
on error goto [handleError]
print httppost$(#url contents$(), #props contents$())
wait

[handleError]
cls
print "Problem with URL. Try again."
print
goto [start]