HTTP Communication
Sends an HTTP request to a web server or REST API and receives the response. This action has no resource selection and no command field, and no field for request headers is provided. See Appendix B for an example that calls a weather API.
URL
Enter the URL to send the request to (for example, https://api.example.com/data or api.example.com/data). If http:// is omitted, it is added automatically.
Connection Timeout
Enter how long (duration) to wait for the server connection. The default is 5 seconds; when the time is exceeded, the connection is considered failed.
Method
Select the HTTP request method. The default is GET.
| Method | Use |
|---|---|
| GET | Retrieves data. |
| POST | Sends data to create a new resource. |
| PUT | Replaces or creates a whole resource. |
| PATCH | Modifies part of a resource. |
| DELETE | Deletes a resource. |
| HEAD | Requests only the meta information, without a body. |
| CONNECT | Establishes a tunnel to the server. |
| OPTIONS | Checks which methods the server supports. |
| TRACE | Traces the request path. |
Content Type
Select the format (MIME type) of the request body. The default is text/plain, and 29 types are
available, including application/json, application/x-www-form-urlencoded, and
multipart/form-data. Displayed only when Method is POST, PUT, PATCH, CONNECT,
or OPTIONS.
Full list of content types
text/plain, text/html, text/css, text/javascript, text/xml, application/json, application/xml, application/xhtml+xml, application/pdf, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/zip, application/octet-stream, image/jpeg, image/png, image/gif, image/svg+xml, audio/mpeg, audio/wav, video/mp4, video/quicktime, application/x-mpegurl, multipart/form-data, multipart/mixed, application/x-www-form-urlencoded, application/javascript, application/font-woff, application/ld+json
Request Body
Enter the request body. Displayed only when Method is POST, PUT, PATCH, CONNECT, or OPTIONS.
Output variables
- Response Code: A Number variable for the server's response code (for example, 200 or 404).
- Response Body: A Text variable for the server's response body. Values in a JSON response are extracted with the JSON blocks of the block editor (Part 8).