HTTP

Description

HTTP Client functions

Categories

NameDescription
ServletFunctions to operate on HTTP servlet request and response objects.

Functions

NameSignature and Synopsis
createKeystore
Creates and returns a Keystore object using the given parameters.
decodeURLString decodeURL(String url, String encoding)
Encode a URL
encodeURLString encodeURL(String url, String encoding)
Encode a URL
fromBase64String decodeBase64(String content, String encoding)
The base64 content to decode
getPostDataObject getPostData(SimpleEvent event)
This method returns post data sent in HTTP post request as a byte[] wrapped inside an Object
getRequestURIString getRequestURI(SimpleEvent requestEvent)
Get Request URI.
loadTrustedCertificates
Loads and returns a Certificate object using the trusted certificates folder.
sendAsynchronousRequest
Send an asynchronous HTTP request.The requesting thread continues processing. The response is handled asynchronously in the callback rule function. The signature of the success rule function should be $1void ruleFunction (String correlationId, Event request, Event response$1) whereas that of the error rule function should be $1void ruleFunction (String correlationId, Event request, BEException exception)$1 where the request event is the event that initiated the request, response is the HTTP response mapped to an Event and correlationId is the correlationId as specified in the original request or that returned by the sendAsynchronousRequest function.

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 not present, the default destination of the request event will be used.

sendRequest
Send a synchronous HTTP request. The requestEvent properties and payload are converted to HTTP headers and POST data respectively. If 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 not present, the default destination of the request event will be used.

sendSecureAsynchronousRequest
Send an asynchronous HTTP request over SSL. The requesting thread continues processing.The response is handled asynchronously in the callback rule function. The signature of the rule function should be $1void ruleFunction (String correlationId, Event request, Event response)$1. where the request event is the event that initiated the request, response is the HTTP response mapped to an Event and correlationId is the correlationId as specified in the original request or that returned by the sendAsynchronousRequest function

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 not present, the default destination of the request event will be used.

sendSecureAsynchronousRequestByProtocol
Send an asynchronous HTTP request over SSL. The requesting thread continues processing.The response is handled asynchronously in the callback rule function. The signature of the rule function should be $1void ruleFunction (String correlationId, Event request, Event response)$1. where the request event is the event that initiated the request, response is the HTTP response mapped to an Event and correlationId is the correlationId as specified in the original request or that returned by the sendAsynchronousRequest function

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 not present, the default destination of the request event will be used.

sendSecureRequest
Send an synchronous HTTP request over SSL. The requestEvent properties and payload are converted to HTTP headers and POST data respectively. If 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 not present, the default destination of the request event will be used.

sendSecureRequestByProtocol
Send an synchronous HTTP request over SSL. The requestEvent properties and payload are converted to HTTP headers and POST data respectively. If 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 not present, the default destination of the request event will be used.

setIgnoreCookiesetIgnoreCookie(String url, SimpleEvent requestEvent)
Configures HTTP to ignore cookies both ways i.e. accepting from the server or sending back to the server.
toBase64String encodeBase64(String content)
The content to encode into base64.