Created 02-19-2016 07:48 PM
I am using the InvokeHTTP processor. I need to post a json to a REST URL. I get the json via a GetFile processor, then manipulate it and finally route it to the InvokeHTTP processor. Well I get an error (412 HTTP code) because I am not able to specify teh content-type.
How can I do it?
Dynamic properties?
Help please,
Massimiliano
Created 02-22-2016 08:18 PM
I have solved by upgrading to version 0.5.0.
Created 02-19-2016 10:00 PM
The documentation for InvokeHttp says that Dynamic properties are sent as headers:
Name | Value | Description |
---|---|---|
Header Name | Attribute Expression Language | Send request header with a key matching the Dynamic Property Key and a value created by evaluating the Attribute Expression Language set in the value of the Dynamic Property. Supports Expression Language: true |
So you should be able to add a property Content-Type with a value of application/json.
Created 02-21-2016 08:32 PM
InvokeHTTP makes use of the "mime.type" attribute. Depending on the version you are using, this may or may not be exposed as a property "Content-Type" which defaults to the expression language "${mime.type}"
Created 02-22-2016 08:17 PM
It is like this from version 0.5.0.
Created 02-21-2016 09:57 PM
First of all, thank you for both answers.
I am working with version 0.4.
I have added a property "Content-Type" with a value of "application/json" and it is not worling.............should i keep the quotes?
Regarding the secons answer...............do you mean I have to amend the mime.type attribute to "application/json"? If so, how?
Thank you,
Regards,
Massimiliano
Created 02-22-2016 08:18 PM
I have solved by upgrading to version 0.5.0.