on 12-13-2016 10:31 AM
Hi experts,
There is a REST web service that we need to consume in HCI via GET method. If there's no error, only HTTP 204 is returned in a Header field called 'status' - no response payload /message body obviously. The only time that there will be response body is if there's an error like HTTP 503 which can also be found in the same 'status' Header field plus an error message in the response body.
The problem is we need to return a response to the consumer (Sender). But since there's no response message body when the web service returns HTTP 204, how can we access the 'status' Header field and maybe integrate it in a body created via a Content Modifier?
Appreciate any inputs. Thanks!
Hi Mark
Adding the contents of your status header to the message body in a Content Modifier step is easy: Just insert ${header.status}
However, all headers are removed, unless you actively add them to the list of allowed headers. In order to do that, click somewhere in the background of your Integration Flow, choose the Runtime Configuration tab and add "status" to the Allowed Header(s) field.
Regards,
Morten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No problem. And yes, in.header.x, in.headers.x, header.x and headers.x are all synonymous. I've blogged about the Simple expression language, if you'd like to know more.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.