There are two ways to add a service: - In Projects view, select Create New > Service. Enter service name, select REST Service (selected by default)and click OK.
- In Palette > Services, drag and drop REST Service component into the screen. Click Add new to define a new service. This step will also add the service to a screen.
Once a service is created, a service editor will open. A service has the following properties. In most cases, you only need to set the service URL.
| Name | Service name | | URL | Service URL. For example: http://search.twitter.com/search.json | | Method | Type of request:
| | Data type | What is the format of the data returned by the service (json, jsonp, xml). Here is a good article that describes how JSONP works.
| | Content Type | If Method selected is post or delete, then body content can be set to:
- json
- xml
- x-www-form-urlencoded
| | Security Context | N/A |
|