Thanks Mark. I am getting the results now. Huagen
On Fri, Jun 10, 2016 at 4:40 PM, Mark Payne <marka...@hotmail.com> wrote: > Huagen, > > That property allows you to specify a Regular Expression that it will > match against all HTTP Header names. > If a header name matches the regex, an attribute will be added to the > FlowFile with that name and value. > For example, if your HTTP Headers look like: > > Content-Type: application/json > Accept: application/xml > > And you set the "HTTP Headers to receive as Attributes (Regex)" to .* > Then you should see two attributes added to the FlowFile, "Content-Type" > and "Accept" with the > corresponding values as above. > > As a more full example, I just set the value to .* and ran the following > command from my shell: > > curl -X POST --data hello http://localhost:4444/contentListener > > The attributes that were added to the FlowFile are as follows: > > > Accept > */* > Content-Length > 5 > Content-Type > application/x-www-form-urlencoded > filename > 612930453556388 > Host > localhost:4444 > path > ./ > restlistener.remote.source.host > 127.0.0.1 > restlistener.remote.user.dn > none > User-Agent > curl/7.43.0 > uuid > 5f8d1704-e328-4456-a2eb-4730454ae64c > > > > Are you not seeing similar results? > > Thanks > -Mark > > > > > > On Jun 10, 2016, at 4:27 PM, Huagen peng <huagen.p...@gmail.com> wrote: > > Hi, > > The ListenHTTP processor has a configuration “HTTP Headers to receive as > Attributes (Regex)”. I tried many ways in vain to get some attributes > in. Does anyone know how to get attributes directly in? I cannot find any > example on it. > > I can post data in JSON format and use the EvaluateJsonPath to get the > attributes. I just want to explore my options. > > Thanks, > > Huagen > > >