Re: InvokeHTTP body

2016-03-14 Thread Pierre Villard
Hi Adam,

Yes it makes sense. It was just an idea for an additional possibility, not
a fundamental change. Anyway, I used other processors as suggested.

Thanks Adam,
Pierre
On Mar 13, 2016 23:52, "Adam Taft"  wrote:

> I think it makes total sense that POST/PUT requests read from the flowfile
> content.  Therefore, the problem should be fixed further up in the flow
> design.  For example, try these solutions:
>
> GenerateFlowFile -> ReplaceText -> InvokeHTTP   (or)
> GetFile -> InvokeHTTP
>
> The problem you're describing has more to do with generating static
> flowfile content, which is a separate concern from how to transfer flowfile
> content over the wire via http.
>
> If the above solutions don't work for you, perhaps a modification of
> GenerateFlowFile could be made which uses static content instead of random
> content?
>
> Hope this helps.
>
> Adam
>
>
> On Fri, Mar 11, 2016 at 6:56 AM, Pierre Villard <
> pierre.villard...@gmail.com
> > wrote:
>
> > Hi,
> >
> > Would it make sense to add a property "body" allowing the user to
> manually
> > set the body of the request for PUT/POST requests?
> >
> > At the moment, the body of the request seems to be only set with the
> > content of incoming flow files. But it is possible to use this processor
> > without incoming relationship. It would be useful to be able to set the
> > body manually.
> >
> > The behaviour would be: if there is an incoming relationship, the
> incoming
> > flow file content is used whatever the property "body" is, and if there
> is
> > no incoming relationship, the request body is based on the property
> value.
> >
> > What do you think?
> >
> > Pierre
> >
>


Re: InvokeHTTP body

2016-03-13 Thread Adam Taft
I think it makes total sense that POST/PUT requests read from the flowfile
content.  Therefore, the problem should be fixed further up in the flow
design.  For example, try these solutions:

GenerateFlowFile -> ReplaceText -> InvokeHTTP   (or)
GetFile -> InvokeHTTP

The problem you're describing has more to do with generating static
flowfile content, which is a separate concern from how to transfer flowfile
content over the wire via http.

If the above solutions don't work for you, perhaps a modification of
GenerateFlowFile could be made which uses static content instead of random
content?

Hope this helps.

Adam


On Fri, Mar 11, 2016 at 6:56 AM, Pierre Villard  wrote:

> Hi,
>
> Would it make sense to add a property "body" allowing the user to manually
> set the body of the request for PUT/POST requests?
>
> At the moment, the body of the request seems to be only set with the
> content of incoming flow files. But it is possible to use this processor
> without incoming relationship. It would be useful to be able to set the
> body manually.
>
> The behaviour would be: if there is an incoming relationship, the incoming
> flow file content is used whatever the property "body" is, and if there is
> no incoming relationship, the request body is based on the property value.
>
> What do you think?
>
> Pierre
>


Re: InvokeHTTP body

2016-03-11 Thread Pierre Villard
Well, in fact, I try to exchange with an external API which is expecting a
POST request without any Content-Type attribute:



*"You provided a non-empty HTTP "Content-Type" header
("application/json").  This API function requires that the header be
missing or empty."*
So in addition to my previous message, I'd suggest authorizing an empty
Content-Type value which would lead to request without this header property.
I'm going to create a JIRA for that.


2016-03-11 12:56 GMT+01:00 Pierre Villard :

> Hi,
>
> Would it make sense to add a property "body" allowing the user to manually
> set the body of the request for PUT/POST requests?
>
> At the moment, the body of the request seems to be only set with the
> content of incoming flow files. But it is possible to use this processor
> without incoming relationship. It would be useful to be able to set the
> body manually.
>
> The behaviour would be: if there is an incoming relationship, the incoming
> flow file content is used whatever the property "body" is, and if there is
> no incoming relationship, the request body is based on the property value.
>
> What do you think?
>
> Pierre
>
>


InvokeHTTP body

2016-03-11 Thread Pierre Villard
Hi,

Would it make sense to add a property "body" allowing the user to manually
set the body of the request for PUT/POST requests?

At the moment, the body of the request seems to be only set with the
content of incoming flow files. But it is possible to use this processor
without incoming relationship. It would be useful to be able to set the
body manually.

The behaviour would be: if there is an incoming relationship, the incoming
flow file content is used whatever the property "body" is, and if there is
no incoming relationship, the request body is based on the property value.

What do you think?

Pierre