- TIBCO BusinessEvents®
- Standard
- HTTP

# HTTP.sendAsynchronousRequest()

## Signature

`String sendAsynchronousRequest(String url, SimpleEvent requestEvent, String correlationId, String successCallbackRuleFunctionURL, String errorCallbackRuleFunctionURL, Object httpConnectionInfo)`

## Domain

ACTION

## Description

Sends an secure/non secure asynchronous HTTP request. The event payload is converted to POST data. Default behavior, if the event payload is null, HTTP GET will be used, else HTTP POST will be used. Alternatively, if HTTP.ConnectionInfo.setHttpMethod is set, then that method type will be used.The requesting thread continues processing. The response is handled asynchronously in the callback rule function. The signature of the success RuleFunction should be $1void ruleFunction (String correlationId, Event request, Event response$1) whereas that of the error RuleFunction should be $1void ruleFunction (String correlationId, Event request, Exception exception)$1 where the request event is the event that initiated the request, the response event is the HTTP response mapped to an Event and correlationId is the correlationId that was specified in the original request or that was returned by the sendAsynchronousRequest function.

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

## Parameters

Name | Type | Description
--- | --- | ---
`url` | `String` | The URL for the endpoint.
`requestEvent` | `SimpleEvent` | The input event to send
`correlationId` | `String` | An optional id to correlate request and response.
`successCallbackRuleFunctionURL` | `String` | The fully qualified path of a rule function to be invoked for success case.
`errorCallbackRuleFunctionURL` | `String` | Error case callback rulefunction. Can be null.
`httpConnectionInfo` | `Object` | HTTP Connection Info object

## Returns

Type | Description
--- | ---
`String` | the correlation id