User Tools

Site Tools


engine:webservices:start

This is an old revision of the document!


Web Services

Web Service Client

You will need to create a web service client when you want to access any third party web service. All you need is the system function #http which takes 3 parameters, URL, http-method and an optional body. The body may be required for http-method POST and may need to be enclosed in a JSON, XML or any other format as required by the API.

	str host="http://maps.googleapis.com/maps/api/geocode/json?address=American+Embassy,+Dhaka,+Bangladesh"
        str response=#http(host,"GET","")

The raw response from the host may be encoded in a JSON, XML or any other format as defined by the API. You will need to extract the relevant data from the raw response. Try the method ca_test_client.method for an example.

/srv/www/htdocs/wiki/data/attic/engine/webservices/start.1435789174.txt.gz · Last modified: 2015/07/01 22:19 by asok