HTTP Actions

Herogi supports http actions to enable webhooks. You can use it to do http api call on your web services or other third party web services

Http Actions

Http actions differs from other actions because they can return data from action. For example making a get call on rest api can return json and then it can be used in other actions. This way you can create pipelines on web services and can make smart automations.

HttpGetAction

It makes a http get call on specified http endpoint.

Action Parameters

Key Data Type Recurring Sample Value Description
url STRING NO https://herogi.com Api endpoint to run http request
queryStringParams STRING YES username,john Query string parameters
headers STRING YES Authorization,X32342343242 Http headers

Action Returns

Event
HttpResponseEvent
GenericErrorEvent

HttpPostAction

It makes a http post call on specified http endpoint.

Action Parameters

Key Data Type Recurring Sample Value Description
url STRING NO https://herogi.com Api endpoint to run http request
queryStringParams STRING YES username,john Query string parameters
headers STRING YES Authorization,X32342343242 Http headers
body STRING NO {“key” : “val”} Http body

Action Returns

Event
HttpResponseEvent
GenericErrorEvent

HttpFormPostAction

It makes a http form post call on specified http endpoint.

Action Parameters

Key Data Type Recurring Sample Value Description
url STRING NO https://herogi.com Api endpoint to run http request
queryStringParams STRING YES username,john Query string parameters
headers STRING YES Authorization,X32342343242 Http headers
params STRING YES amount,40 Http form parameters

Action Returns

Event
HttpResponseEvent
GenericErrorEvent

HttpPutAction

It makes a http put call on specified http endpoint.

Action Parameters

Key Data Type Recurring Sample Value Description
url STRING NO https://herogi.com Api endpoint to run http request
queryStringParams STRING YES username,john Query string parameters
headers STRING YES Authorization,X32342343242 Http headers
body STRING NO {“key” : “val”} Http body

Action Returns

Event
HttpResponseEvent
GenericErrorEvent

HttpDeleteAction

It makes a http delete call on specified http endpoint.

Action Parameters

Key Data Type Recurring Sample Value Description
url STRING NO https://herogi.com Api endpoint to run http request
queryStringParams STRING YES username,john Query string parameters
headers STRING YES Authorization,X32342343242 Http headers

Action Returns

Event
HttpResponseEvent
GenericErrorEvent

HtmlReturningAction

Post a html content on specified end point.

Action Parameters

Key Data Type Recurring Sample Value Description
url STRING NO https://herogi.com Api endpoint to run http request
queryStringParams STRING YES username,john Query string parameters
authorization STRING NO AXEX32342343242 Authorization header
body STRING NO <div class="notif">Promotion!</div> Http body

Action Events

Http actions return below events after the call completed.

HttpResponseEvent

Returns if the http connection successfully established on end point.

Event Parameters

Key Data Type Sample Value Description
statusCode NUMERIC 200 Status code of response
headers STRING {“content-type” : “application/json”} Headers of response as json
body STRING {“key” : “val”} Body of response

GenericErrorEvent

Returns if the http connection couldn’t established on end point.

Event Parameters

Key Data Type Sample Value Description
code NUMERIC -1 Error code
message STRING Unknown host Error message