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.
Tags
egress, http, https, response, web service
Properties
In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.
Display Name | API Name | Default Value | Allowable Values | Description |
---|---|---|---|---|
HTTP Status Code * | HTTP Status Code | The HTTP Status Code to use when responding to the HTTP Request. See Section 10 of RFC 2616 for more information. Supports Expression Language, using FlowFile attributes and Environment variables. | ||
HTTP Context Map * | HTTP Context Map | Controller Service: HttpContextMap Implementations: 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
Name | Value | Description |
---|---|---|
An HTTP header name | An HTTP header value | These HTTPHeaders are set in the HTTP Response Supports Expression Language: Yes, evaluated using FlowFile Attributes and Environment variables. |
Relationships
Name | Description |
---|---|
failure | FlowFiles 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. |
success | FlowFiles will be routed to this Relationship after the response has been successfully sent to the requestor |
Reads Attributes
Name | Description |
---|---|
http.context.identifier | The 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.local.name | IP address/hostname of the server. Used for provenance event. |
http.remote.host | IP address of the client. Used for provenance event. |
http.request.uri | Value of the URI requested by the client. Used for provenance event. |
http.server.port | Listening port of the server. Used for provenance event. |
http.subject.dn | SSL distinguished name (if any). Used for provenance event. |
Writes Attributes
This processor does not write attributes.
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
This component does not specify system resource considerations.