Accessing a web service from FiveTouch !!!
Posted: Thu Nov 26, 2015 11:45 am
Thanks to Rafa Carmona here you have a working example of how to access a web service
using Harbour code and FiveTouch!![Smile :-)](./images/smilies/icon_smile.gif)
This opens the door to manage any remote database (MySQL, SQL, etc) using a web service
which it is the advised way to do it![Smile :-)](./images/smilies/icon_smile.gif)
Finally we can use any database engine from FiveTouch! Many thanks Rafa!!!
![Image](https://bitbucket.org/fivetech/screenshots/downloads/webservice_fivetouch.JPG)
using Harbour code and FiveTouch!
![Smile :-)](./images/smilies/icon_smile.gif)
This opens the door to manage any remote database (MySQL, SQL, etc) using a web service
which it is the advised way to do it
![Smile :-)](./images/smilies/icon_smile.gif)
Finally we can use any database engine from FiveTouch! Many thanks Rafa!!!
Code: Select all
PROCEDURE test_htip()
LOCAL oHttp, hQuery, cResponse
hQUery := { => }
hb_HCaseMatch( hQuery, .F. )
oHttp := TIPClientHTTP():New( "http://adaptaproyectoserp.com.ve/webservices/client.php", .T. )
hQuery[ "nombre" ] := "THefull The BEST!"
IF ! oHttp:open()
? "Error: oHttp:open(): " + oHttp:lastErrorMessage()
RETURN
ENDIF
IF ! oHttp:post( hQuery )
? "Error: oHttp:post(): " + oHttp:lastErrorMessage()
ENDIF
cResponse := oHttp:readAll()
oHttp:close()
Alert( cResponse )
RETURN