HandleHttpResponse

Description:

Sends an HTTP Response to the Requestor that generated a FlowFile. This Processor is designed to be used in conjunction with the HandleHttpRequest in order to create a web service.

Additional Details...

Tags:

http, https, response, egress, web service

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
HTTP Status CodeHTTP Status CodeThe HTTP Status Code to use when responding to the HTTP Request. See Section 10 of RFC 2616 for more information.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
HTTP Context MapHTTP Context MapController Service API:
HttpContextMap
Implementation: StandardHttpContextMap
The HTTP Context Map Controller Service to use for caching the HTTP Request Information
Attributes to add to the HTTP Response (Regex)Attributes to add to the HTTP Response (Regex)Specifies the Regular Expression that determines the names of FlowFile attributes that should be added to the HTTP response

Dynamic Properties:

Supports Sensitive Dynamic Properties: No

Dynamic Properties allow the user to specify both the name and value of a property.

NameValueDescription
An HTTP header nameAn HTTP header valueThese HTTPHeaders are set in the HTTP Response
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

Relationships:

NameDescription
successFlowFiles will be routed to this Relationship after the response has been successfully sent to the requestor
failureFlowFiles will be routed to this Relationship if the Processor is unable to respond to the requestor. This may happen, for instance, if the connection times out or if NiFi is restarted before responding to the HTTP Request.

Reads Attributes:

NameDescription
http.context.identifierThe value of this attribute is used to lookup the HTTP Response so that the proper message can be sent back to the requestor. If this attribute is missing, the FlowFile will be routed to 'failure.'
http.request.uriValue of the URI requested by the client. Used for provenance event.
http.remote.hostIP address of the client. Used for provenance event.
http.local.nameIP address/hostname of the server. Used for provenance event.
http.server.portListening port of the server. Used for provenance event.
http.subject.dnSSL distinguished name (if any). Used for provenance event.

Writes Attributes:

None specified.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

None specified.

See Also:

HandleHttpRequest, StandardHttpContextMap