New topic: POST Data to an External web service
<http://forums.realsoftware.com/viewtopic.php?t=47194> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message tigme Post subject: POST Data to an External web servicePosted: Thu Mar 07, 2013 1:05 am Joined: Wed Aug 25, 2010 4:04 am Posts: 84 Location: South Africa Is there a way to POST/GET data variables to an external web service. ie. When I press a button on a form built in RealStudio Web I want it to submit the details to an external location: The RealStedio web-app could be running on any other domain. <form action="http://www.somewhere.com/acceptrequest/index.php" method="post" > <input type="hidden" name="buttonaction" value="buynow"> <input type="hidden" name="id" value="YVI0527RI6"> <input type="hidden" name="Title" value="Mr"> <input type="hidden" name="FirstName" value="Sarel"> <input type="hidden" name="LastName" value="van der Merwe"> <input type="hidden" name="Email" value="[email protected]"> <input type="image" src="https://www.somewhere.com/images/cartbuttons/bn04.gif"> </form> After posting the data RealStudio should then direct my browser to the above location: http://www.somewhere.com/acceptrequest/index.php _________________ Rudolph Thomas TIGME.COM Top Akiland Post subject: Re: POST Data to an External web servicePosted: Thu Mar 07, 2013 1:32 am Joined: Tue Jan 04, 2011 3:02 am Posts: 1156 Location: Jönköping, Sweden I think you're looking for the HTTPSocket. http://docs.realsoftware.com/index.php/HTTPSocket It can post data like this: Dim form As Dictionary Dim socket1 As New HTTPSocket // create and populate the form object form = New Dictionary form.Value("id") = "YVI0527RI6" form.Value("Title") = "Mr" form.Value("FirstName") = "Sarel" form.Value("LastName") = "van der Merwe" form.Value("Email") = "[email protected]" // setup the socket to POST the form socket1.SetFormData(form) socket1.Post("http://www.somewhere.com/acceptrequest/index.php") _________________ http://www.linkedin.com/in/albinkiland Dev. iMac 27" + 2x22" LG (2.8GHz Intel Core i7, 12GB RAM, 120GB SSD) OS X 10.8 REAL.Studio Web Edition 2011r3 Top tigme Post subject: Re: POST Data to an External web servicePosted: Thu Mar 07, 2013 3:21 am Joined: Wed Aug 25, 2010 4:04 am Posts: 84 Location: South Africa Thanks Akiland The problem I have now is that I actually want RealStudio to re-direct to the Address where I'm posting the data. When the user press my button they need to be taken to another website. I can see the data going out and coming back with Wireshark. Any ideas? _________________ Rudolph Thomas TIGME.COM Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ]
-- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
