mrjaw Active Member Licensed User Longtime User Jul 29, 2014 #1 Hi! I am trying to do a call a webservice using POST method , I use this B4X: Dim JobBuscar As HttpJob JobBuscar.Initialize("JobBuscar", Me) ' ID=901 Token = "2938374367263" param= "getfacturas/" & Token & "/" & ID ' Main.url2 = Main.Urlserver & param 'http://ip:8080/appws/ws/getfacturas/2938374367263/901 Log(Main.url2) ' Dim Result as String ToastMessageShow("Buscando facturas",True) JobBuscar.PostString(Main.url2,Result) This is the correct way to use a POST method with this http://ip:8080/appws/ws/getfacturas/2938374367263/901 What is the use for second parameter ?
Hi! I am trying to do a call a webservice using POST method , I use this B4X: Dim JobBuscar As HttpJob JobBuscar.Initialize("JobBuscar", Me) ' ID=901 Token = "2938374367263" param= "getfacturas/" & Token & "/" & ID ' Main.url2 = Main.Urlserver & param 'http://ip:8080/appws/ws/getfacturas/2938374367263/901 Log(Main.url2) ' Dim Result as String ToastMessageShow("Buscando facturas",True) JobBuscar.PostString(Main.url2,Result) This is the correct way to use a POST method with this http://ip:8080/appws/ws/getfacturas/2938374367263/901 What is the use for second parameter ?
ivan.tellez Active Member Licensed User Longtime User Jul 30, 2014 #2 It is better if you check the httputils tutorial here Last edited: Aug 2, 2014 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Aug 1, 2014 #3 He is using HttpUtils2. This is the correct approach. The second parameter is the POST payload (result is a bad name for it). You can pass an empty string if it is not needed. Upvote 0
He is using HttpUtils2. This is the correct approach. The second parameter is the POST payload (result is a bad name for it). You can pass an empty string if it is not needed.
mrjaw Active Member Licensed User Longtime User Aug 1, 2014 #4 Erel, now it works so fine.! But I dont know yet what for is the second parameter. I read that is the payload but really I dont know yet Upvote 0
Erel, now it works so fine.! But I dont know yet what for is the second parameter. I read that is the payload but really I dont know yet
Erel B4X founder Staff member Licensed User Longtime User Aug 3, 2014 #5 You can read more about POST requests here: http://en.wikipedia.org/wiki/POST_(HTTP) Upvote 0