Sorry, what version are you running? Adding the property like that is something 
I added for 0.4.0.
 
- - - - - - 
Joseph Percivall
linkedin.com/in/Percivall
e: [email protected]




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



Yes, I passed a header with key "Accept" and value "application/json". I 
followed your instruction and add a new property in the InvokeHTTP process 
called "Accept" and value of "application/json", but I now had an error said 
"'Accept' validated against 'application/json' is invalid because 'Accept' is 
not a supported property." 

Did I do something wrong?

Thanks,

Indus


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

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