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.