- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to add Content-Type=application/json to InvokeHTTP
Created ‎02-19-2016 07:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have solved by upgrading to version 0.5.0.
Created ‎02-19-2016 10:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is like this from version 0.5.0.
Created ‎02-21-2016 09:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have solved by upgrading to version 0.5.0.
