Apama 10.3 | Apama Documentation | Connecting Apama Applications to External Components | Standard Connectivity Plug-ins | The HTTP Server Transport Connectivity Plug-in | Mapping events between EPL and HTTP server requests
Mapping events between EPL and HTTP server requests
Distinguishing request types
Handling HTTP headers
Mapping the body
Dealing with cookies
Providing HTTP query parameters
The HTTP server is a general event submission API. A request to the HTTP server contains a binary payload which is the body of the request and further metadata fields describing the request. For the requests to be useful to EPL, they must be converted into the format expected by Apama. This is done using the Classifier codec, Mapper codec and other codecs (see Codec Connectivity Plug-ins).
The event types used in EPL should be specific to your application and then mapped in the chain from the fields produced by the HTTP server. The following fields are created in each event by the HTTP server. Field names containing periods (.) indicate nested map structures within the metadata. This nesting is automatically handled by the Mapper codec, and fields can be referred to there just using these names (see also The Mapper codec connectivity plug-in).
Binary payload of the request.
The path component (string) of the URI.
The HTTP method of the request: PUT, POST, GET, or DELETE.
When HTTP basic authentication is enabled, the authenticated user name (string) .
The MIME type of the payload (string), taken from the first parameter of the HTTP Content-Type header, converted to lower case and with spaces trimmed off. See also Handling HTTP headers.
The charset parameter of the Content-Type header (string), converted to lower case, with spaces trimmed off. See also Handling HTTP headers.
A key-value map of cookies from the request (map). See also Dealing with cookies.
A key-value map of the options in the query-string component of the request URI (map). See also Providing HTTP query parameters.
A key-value map of the HTTP headers sent by the request (map). Key names are converted to lower case regardless of original capitalization. See also Handling HTTP headers.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.