"http" object provides methods to perform HTTP methods.
"http" method
Performs a HTTP call.
| request | required | request object |
"request" has following attributes:
| method | required | HTTP method to call |
| url | required | url to call |
| parameters | key-value map with URL parameters | |
| form | key-value map with form parameters | |
| charset | charset to encode form | |
| headers | key-value map with headers | |
| cookies | key-value map with cookies | |
| data | string to send as request data |
"response" object has following attributes:
| statusCode | required | http response code integer |
| status | required | http response code description |
| contentLength | content length in bytes, null if no content | |
| contentType | content type, null if no content | |
| content | content as string, null if no content | |
| headers | required | key-value map with headers |
| cookies | required | key-value map with cookies |
Example
"get/post/put/delete" methods
This functions are a shortcuts to '"http" function. "Method" property in "request" object is automatically set..
Example