| <!DOCTYPE html> |
| <html lang="en"> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| http://www.apache.org/licenses/LICENSE-2.0 |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <head> |
| <meta charset="utf-8" /> |
| <title>HandleHttpRequest</title> |
| <link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css" /> |
| </head> |
| |
| <body> |
| <h2>Usage Description</h2> |
| <p> |
| The pairing of this Processor with a <a href="../org.apache.nifi.processors.standard.HandleHttpResponse/index.html">HandleHttpResponse</a> Processor |
| provides the ability to use NiFi to visually construct a web server that can carry out any functionality that is available |
| through the existing Processors. For example, one could construct a Web-based front end to an SFTP Server by constructing a |
| flow such as: |
| </p> |
| |
| <p> |
| <a href="index.html">HandleHttpRequest</a> -> |
| <a href="../org.apache.nifi.processors.standard.PutSFTP/index.html">PutSFTP</a> -> |
| <a href="../org.apache.nifi.processors.standard.HandleHttpResponse/index.html">HandleHttpResponse</a> |
| </p> |
| |
| <p> |
| The HandleHttpRequest Processor provides several Properties to configure which methods are supported, the paths that are |
| supported, and SSL configuration. |
| </p> |
| |
| <p> |
| To handle requests with Content-Type: <i>multipart/form-data</i> containing multiple parts, additional attention needs to be paid. |
| Each <i>part</i> generates a FlowFile of its own. To each these FlowFiles, some special attributes are written: |
| <ul> |
| <li>http.context.identifier</li> |
| <li>http.multipart.fragments.sequence.number</li> |
| <li>http.multipart.fragments.total.number</li> |
| </ul> |
| These attributes could be used to implement a gating mechanism for HandleHttpResponse processor to wait for the processing of FlowFiles |
| with sequence number <b>http.multipart.fragments.sequence.number</b> until up to <b>http.multipart.fragments.total.number</b> of flow files are processed, |
| belonging to the same <b>http.context.identifier</b>, which is unique to the request. |
| </p> |
| </body> |
| </html> |