- TIBCO BusinessEvents®
- Standard
- HTTP

# 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. 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.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

Name | Type | Description
--- | --- | ---
`url` | `String` | The URL for the endpoint.
`requestEvent` | `SimpleEvent` | The input event to send
`responseEventURI` | `String` | URI of event to be created once response received
`timeoutMillis` | `long` | time out for the operation, -1 signifies wait forever.
`httpConnectionInfo` | `Object` | HTTP Connection Info object

## Returns

Type | Description
--- | ---
`Event` | event The response event