I see, as for the request I'm guessing you mean you pass a header with key 
"Accept" and value "application/json"? If so in the configuration tab for the 
processor properties create a new dynamic one (using the plus in the top right) 
with a key of "Accept" and value of "application/json".

You use the "Attributes to Send" property when you already have the header 
value as an attribute of the flowfile and want to send an attribute with that 
name and it's value.

Joe
 
- - - - - - 
Joseph Percivall
linkedin.com/in/Percivall
e: [email protected]




On Friday, December 4, 2015 4:06 PM, indus well <[email protected]> wrote:



Thanks, Joe. My use case involves calling a REST service that returns XML 
response by default. However, it also has option for JSON which I can pass 
"Accept: application/json" along with the request using CURL for example. I 
tried to set that on the "Attributes to Send" property in the InvokeHTTP 
processor, but it did not work. It always returns XML.

Thanks,

Indus 


On Fri, Dec 4, 2015 at 2:49 PM, Joe Percivall <[email protected]> wrote:

Hello Indus,
>
>Are you receiving a specific error when you attempt to receive a JSON response?
>
>I can configure an InvokeHTTP processor to GET "http://api.randomuser.me/"; by 
>just setting the URL and it properly receives back a JSON response.
>
>Joe
>
>
>- - - - - -
>Joseph Percivall
>linkedin.com/in/Percivall
>e: [email protected]
>
>
>
>
>
>On Friday, December 4, 2015 3:27 PM, indus well <[email protected]> wrote:
>
>
>
>Hi All:
>
>How would I configure the InvokeHTTP processor to receive content type of JSON 
>response?
>
>Thanks,
>
>Indus Well
>

Reply via email to