HTTP Client Service
Enable your West Connectivity solution to make HTTP requests.
This service allows Event Handlers in West Connectivity to make HTTP requests to external servers. You can use this post device data to an existing business system, integrate with a 3rd party web application, or many more use cases.
Operations
Http
- Http.delete() - Make a http DELETE request
- Http.get() - Make a http GET request
- Http.head() - Make a http HEAD request
- Http.options() - Make a http OPTIONS request
- Http.patch() - Make a http PATCH request
- Http.post() - Make a http POST request
- Http.put() - Make a http PUT request
- Http.request() - Make a http request
Configuration parameters
Please note that bold arguments are required, while italic arguments are optional.
Name | Type | Description |
---|---|---|
credentials | string(password) | Credentials (key/pair to be replaced in http headers/body/url) e.g. |
Operations
Please note that bold arguments are required, while italic arguments are optional.
delete
Make a http DELETE request
Arguments
parameters (object) - Object containing service call parameters.
Name | Type | Description |
---|---|---|
url | string | Url to make the request against. |
body | string | The raw data to be transmitted. If this is used along with a GET request, the payload will be ignored. |
json | object | Json data to be transmitted, this will set content-type to 'application/json'. |
method | string | Http method for the request Default: "get" |
params | object | Field-value pairs data, this will be encoded as query string in URL when method is GET, otherwise encoded as name-value pairs in body, in this case content-type will be set as 'application/x-www-form-urlencoded'. |
headers | object | Additional headers to provide in the request. |
headers.*** | string | Header value |
credentials | string | Credentials |
conn_timeout | integer | Timeout to establish a connection, in milliseconds, default 3000, maximum 10000 |
recv_timeout | integer | Timeout used when receiving a connection, in milliseconds, default 5000, maximum 20000 |
Responses
Code | Body Type | Description |
---|---|---|
200 | object | Request results retrieved |
400 | nil | Required parameters are not provided |
422 | nil | Provided parameters are not valid |
Object Parameter of 200 response:
Name | Type | Description |
---|---|---|
body | string | The body of response |
headers | object | The headers of response |
status_code | integer | The status code of response |
Example
get
Make a http GET request
Arguments
parameters (object) - Object containing service call parameters.
Name | Type | Description |
---|---|---|
url | string | Url to make the request against. |
body | string | The raw data to be transmitted. If this is used along with a GET request, the payload will be ignored. |
json | object | Json data to be transmitted, this will set content-type to 'application/json'. |
method | string | Http method for the request Default: "get" |
params | object | Field-value pairs data, this will be encoded as query string in URL when method is GET, otherwise encoded as name-value pairs in body, in this case content-type will be set as 'application/x-www-form-urlencoded'. |
headers | object | Additional headers to provide in the request. |
headers.*** | string | Header value |
credentials | string | Credentials |
conn_timeout | integer | Timeout to establish a connection, in milliseconds, default 3000, maximum 10000 |
recv_timeout | integer | Timeout used when receiving a connection, in milliseconds, default 5000, maximum 20000 |
Responses
Code | Body Type | Description |
---|---|---|
200 | object | Request results retrieved |
400 | nil | Required parameters are not provided |
422 | nil | Provided parameters are not valid |
Object Parameter of 200 response:
Name | Type | Description |
---|---|---|
body | string | The body of response |
headers | object | The headers of response |
status_code | integer | The status code of response |
Example
head
Make a http HEAD request
Arguments
parameters (object) - Object containing service call parameters.
Name | Type | Description |
---|---|---|
url | string | Url to make the request against. |
body | string | The raw data to be transmitted. If this is used along with a GET request, the payload will be ignored. |
json | object | Json data to be transmitted, this will set content-type to 'application/json'. |
method | string | Http method for the request Default: "get" |
params | object | Field-value pairs data, this will be encoded as query string in URL when method is GET, otherwise encoded as name-value pairs in body, in this case content-type will be set as 'application/x-www-form-urlencoded'. |
headers | object | Additional headers to provide in the request. |
headers.*** | string | Header value |
credentials | string | Credentials |
conn_timeout | integer | Timeout to establish a connection, in milliseconds, default 3000, maximum 10000 |
recv_timeout | integer | Timeout used when receiving a connection, in milliseconds, default 5000, maximum 20000 |
Responses
Code | Body Type | Description |
---|---|---|
200 | object | Request results retrieved |
400 | nil | Required parameters are not provided |
422 | nil | Provided parameters are not valid |
Object Parameter of 200 response:
Name | Type | Description |
---|---|---|
body | string | The body of response |
headers | object | The headers of response |
status_code | integer | The status code of response |
Example
options
Make a http OPTIONS request
Arguments
parameters (object) - Object containing service call parameters.
Name | Type | Description |
---|---|---|
url | string | Url to make the request against. |
body | string | The raw data to be transmitted. If this is used along with a GET request, the payload will be ignored. |
json | object | Json data to be transmitted, this will set content-type to 'application/json'. |
method | string | Http method for the request Default: "get" |
params | object | Field-value pairs data, this will be encoded as query string in URL when method is GET, otherwise encoded as name-value pairs in body, in this case content-type will be set as 'application/x-www-form-urlencoded'. |
headers | object | Additional headers to provide in the request. |
headers.*** | string | Header value |
credentials | string | Credentials |
conn_timeout | integer | Timeout to establish a connection, in milliseconds, default 3000, maximum 10000 |
recv_timeout | integer | Timeout used when receiving a connection, in milliseconds, default 5000, maximum 20000 |
Responses
Code | Body Type | Description |
---|---|---|
200 | object | Request results retrieved |
400 | nil | Required parameters are not provided |
422 | nil | Provided parameters are not valid |
Object Parameter of 200 response:
Name | Type | Description |
---|---|---|
body | string | The body of response |
headers | object | The headers of response |
status_code | integer | The status code of response |
Example
patch
Make a http PATCH request
Arguments
parameters (object) - Object containing service call parameters.
Name | Type | Description |
---|---|---|
url | string | Url to make the request against. |
body | string | The raw data to be transmitted. If this is used along with a GET request, the payload will be ignored. |
json | object | Json data to be transmitted, this will set content-type to 'application/json'. |
method | string | Http method for the request Default: "get" |
params | object | Field-value pairs data, this will be encoded as query string in URL when method is GET, otherwise encoded as name-value pairs in body, in this case content-type will be set as 'application/x-www-form-urlencoded'. |
headers | object | Additional headers to provide in the request. |
headers.*** | string | Header value |
credentials | string | Credentials |
conn_timeout | integer | Timeout to establish a connection, in milliseconds, default 3000, maximum 10000 |
recv_timeout | integer | Timeout used when receiving a connection, in milliseconds, default 5000, maximum 20000 |
Responses
Code | Body Type | Description |
---|---|---|
200 | object | Request results retrieved |
400 | nil | Required parameters are not provided |
422 | nil | Provided parameters are not valid |
Object Parameter of 200 response:
Name | Type | Description |
---|---|---|
body | string | The body of response |
headers | object | The headers of response |
status_code | integer | The status code of response |
Example
post
Make a http POST request
Arguments
parameters (object) - Object containing service call parameters.
Name | Type | Description |
---|---|---|
url | string | Url to make the request against. |
body | string | The raw data to be transmitted. If this is used along with a GET request, the payload will be ignored. |
json | object | Json data to be transmitted, this will set content-type to 'application/json'. |
method | string | Http method for the request Default: "get" |
params | object | Field-value pairs data, this will be encoded as query string in URL when method is GET, otherwise encoded as name-value pairs in body, in this case content-type will be set as 'application/x-www-form-urlencoded'. |
headers | object | Additional headers to provide in the request. |
headers.*** | string | Header value |
credentials | string | Credentials |
conn_timeout | integer | Timeout to establish a connection, in milliseconds, default 3000, maximum 10000 |
recv_timeout | integer | Timeout used when receiving a connection, in milliseconds, default 5000, maximum 20000 |
Responses
Code | Body Type | Description |
---|---|---|
200 | object | Request results retrieved |
400 | nil | Required parameters are not provided |
422 | nil | Provided parameters are not valid |
Object Parameter of 200 response:
Name | Type | Description |
---|---|---|
body | string | The body of response |
headers | object | The headers of response |
status_code | integer | The status code of response |
Example
put
Make a http PUT request
Arguments
parameters (object) - Object containing service call parameters.
Name | Type | Description |
---|---|---|
url | string | Url to make the request against. |
body | string | The raw data to be transmitted. If this is used along with a GET request, the payload will be ignored. |
json | object | Json data to be transmitted, this will set content-type to 'application/json'. |
method | string | Http method for the request Default: "get" |
params | object | Field-value pairs data, this will be encoded as query string in URL when method is GET, otherwise encoded as name-value pairs in body, in this case content-type will be set as 'application/x-www-form-urlencoded'. |
headers | object | Additional headers to provide in the request. |
headers.*** | string | Header value |
credentials | string | Credentials |
conn_timeout | integer | Timeout to establish a connection, in milliseconds, default 3000, maximum 10000 |
recv_timeout | integer | Timeout used when receiving a connection, in milliseconds, default 5000, maximum 20000 |
Responses
Code | Body Type | Description |
---|---|---|
200 | object | Request results retrieved |
400 | nil | Required parameters are not provided |
422 | nil | Provided parameters are not valid |
Object Parameter of 200 response:
Name | Type | Description |
---|---|---|
body | string | The body of response |
headers | object | The headers of response |
status_code | integer | The status code of response |
Example
request
Make a http request
Arguments
parameters (object) - Object containing service call parameters.
Name | Type | Description |
---|---|---|
url | string | Url to make the request against. |
body | string | The raw data to be transmitted. If this is used along with a GET request, the payload will be ignored. |
json | object | Json data to be transmitted, this will set content-type to 'application/json'. |
method | string | Http method for the request Default: "get" |
params | object | Field-value pairs data, this will be encoded as query string in URL when method is GET, otherwise encoded as name-value pairs in body, in this case content-type will be set as 'application/x-www-form-urlencoded'. |
headers | object | Additional headers to provide in the request. |
headers.*** | string | Header value |
credentials | string | Credentials |
conn_timeout | integer | Timeout to establish a connection, in milliseconds, default 3000, maximum 10000 |
recv_timeout | integer | Timeout used when receiving a connection, in milliseconds, default 5000, maximum 20000 |
Responses
Code | Body Type | Description |
---|---|---|
200 | object | Request results retrieved |
400 | nil | Required parameters are not provided |
422 | nil | Provided parameters are not valid |
Object Parameter of 200 response:
Name | Type | Description |
---|---|---|
body | string | The body of response |
headers | object | The headers of response |
status_code | integer | The status code of response |
Example
Service Health Check
Operations
/
Enable the hosting system to check if service is active and running
Arguments
No Content
Responses
Name | Type | Description |
---|---|---|
200 | string | OK |
Errors
No content