HTTP.sendRequest()

Signature

Event sendRequest(String url, SimpleEvent requestEvent, String responseEventURI, long timeoutMillis, Object httpConnectionInfo)

Domain

ACTION

Description

Sends a secure/non secure synchronous HTTP request. The event properties are converted to HTTP headers. The event payload is converted to POST data. If the event payload is null, HTTP GET will be used, else HTTP POST will be used.This will return an event of type responseEventURI as a response encapsulating response headers as properties and post data if any as event payload.

This function can also be used to send SOAP requests. For SOAP requests, the SOAPAction will be taken from a corresponding event property, or, if the property is not present, the default destination of the request event.

Parameters

NameTypeDescription
urlStringThe URL for the endpoint.
requestEventSimpleEventThe input event to send
responseEventURIStringURI of event to be created once response received
timeoutMillislongtime out for the operation, -1 signifies wait forever.
httpConnectionInfoObjectHTTP Connection Info object

Returns

TypeDescription
Eventevent The response event