HandleHttpRequest 2025.10.9.21

Bundle

org.apache.nifi | nifi-standard-nar

Description

Starts an HTTP Server and listens for HTTP Requests. For each request, creates a FlowFile and transfers to ‘success’. This Processor is designed to be used in conjunction with the HandleHttpResponse Processor in order to create a Web Service. In case of a multipart request, one FlowFile is generated for each part.

Tags

http, https, ingress, listen, request, web service

Input Requirement

FORBIDDEN

Supports Sensitive Dynamic Properties

false

Properties

PropertyDescription
Additional HTTP MethodsA comma-separated list of non-standard HTTP Methods that should be allowed
Allow DELETEAllow HTTP DELETE Method
Allow GETAllow HTTP GET Method
Allow HEADAllow HTTP HEAD Method
Allow OPTIONSAllow HTTP OPTIONS Method
Allow POSTAllow HTTP POST Method
Allow PUTAllow HTTP PUT Method
Allowed PathsA Regular Expression that specifies the valid HTTP Paths that are allowed in the incoming URL Requests. If this value is specified and the path of the HTTP Requests does not match this Regular Expression, the Processor will respond with a 404: NotFound
Client AuthenticationSpecifies whether or not the Processor should authenticate clients. This value is ignored if the <SSL Context Service> Property is not specified or the SSL Context provided uses only a KeyStore and not a TrustStore.
Default URL Character SetThe character set to use for decoding URL parameters if the HTTP Request does not supply one
HTTP Context MapThe HTTP Context Map Controller Service to use for caching the HTTP Request Information
HTTP ProtocolsHTTP Protocols supported for Application Layer Protocol Negotiation with TLS
HostnameThe Hostname to bind to. If not specified, will bind to all hosts
Listening PortThe Port to listen on for incoming HTTP requests
Maximum ThreadsThe maximum number of threads that the embedded HTTP server will use for handling requests.
Request Header Maximum SizeThe maximum supported size of HTTP headers in requests sent to this processor
SSL Context ServiceThe SSL Context Service to use in order to secure the server. If specified, the server will accept only HTTPS requests; otherwise, the server will accept only HTTP requests
container-queue-sizeThe size of the queue for Http Request Containers
multipart-read-buffer-sizeThe threshold size, at which the contents of an incoming file would be written to disk. Only applies for requests with Content-Type: multipart/form-data. It is used to prevent denial of service type of attacks, to prevent filling up the heap or disk space.
multipart-request-max-sizeThe max size of the request. Only applies for requests with Content-Type: multipart/form-data, and is used to prevent denial of service type of attacks, to prevent filling up the heap or disk space
parameters-to-attributesA comma-separated list of HTTP parameters or form data to output as attributes

Relationships

NameDescription
successAll content that is received is routed to the ‘success’ relationship

Writes attributes

NameDescription
http.context.identifierAn identifier that allows the HandleHttpRequest and HandleHttpResponse to coordinate which FlowFile belongs to which HTTP Request/Response.
mime.typeThe MIME Type of the data, according to the HTTP Header “Content-Type”
http.servlet.pathThe part of the request URL that is considered the Servlet Path
http.context.pathThe part of the request URL that is considered to be the Context Path
http.methodThe HTTP Method that was used for the request, such as GET or POST
http.local.nameIP address/hostname of the server
http.server.portListening port of the server
http.query.stringThe query string portion of the Request URL
http.remote.hostThe hostname of the requestor
http.remote.addrThe hostname:port combination of the requestor
http.remote.userThe username of the requestor
http.protocolThe protocol used to communicate
http.request.uriThe full Request URL
http.auth.typeThe type of HTTP Authorization used
http.principal.nameThe name of the authenticated user making the request
http.query.param.XXXEach of query parameters in the request will be added as an attribute, prefixed with “http.query.param.”
http.param.XXXForm parameters in the request that are configured by “Parameters to Attributes List” will be added as an attribute, prefixed with “http.param.”. Putting form parameters of large size is not recommended.
http.subject.dnThe Distinguished Name of the requestor. This value will not be populated unless the Processor is configured to use an SSLContext Service
http.issuer.dnThe Distinguished Name of the entity that issued the Subject’s certificate. This value will not be populated unless the Processor is configured to use an SSLContext Service
http.certificate.sans.N.nameX.509 Client Certificate Subject Alternative Name value from mutual TLS authentication. The attribute name has a zero-based index ordered according to the content of Client Certificate
http.certificate.sans.N.nameTypeX.509 Client Certificate Subject Alternative Name type from mutual TLS authentication. The attribute name has a zero-based index ordered according to the content of Client Certificate. The attribute value is one of the General Names from RFC 3280 Section 4.1.2.7
http.headers.XXXEach of the HTTP Headers that is received in the request will be added as an attribute, prefixed with “http.headers.” For example, if the request contains an HTTP Header named “x-my-header”, then the value will be added to an attribute named “http.headers.x-my-header”
http.headers.multipart.XXXEach of the HTTP Headers that is received in the multipart request will be added as an attribute, prefixed with “http.headers.multipart.” For example, if the multipart request contains an HTTP Header named “content-disposition”, then the value will be added to an attribute named “http.headers.multipart.content-disposition”
http.multipart.sizeFor requests with Content-Type “multipart/form-data”, the part’s content size is recorded into this attribute
http.multipart.content.typeFor requests with Content-Type “multipart/form-data”, the part’s content type is recorded into this attribute
http.multipart.nameFor requests with Content-Type “multipart/form-data”, the part’s name is recorded into this attribute
http.multipart.filenameFor requests with Content-Type “multipart/form-data”, when the part contains an uploaded file, the name of the file is recorded into this attribute. Files are stored temporarily at the default temporary-file directory specified in “java.io.File” Java Docs)
http.multipart.fragments.sequence.numberFor requests with Content-Type “multipart/form-data”, the part’s index is recorded into this attribute. The index starts with 1.
http.multipart.fragments.total.numberFor requests with Content-Type “multipart/form-data”, the count of all parts is recorded into this attribute.

See also