Skip to Content

Consuming REST Service without message body in response

Dec 13, 2016 at 10:31 AM


avatar image

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!

10 |10000 characters needed characters left characters exceeded
Former Member

Hi Mark,

How did you consume the web service from within the Integration Process box in your iflow?

Is there a connector I can use to consume a web service from within integration box ?

I am looking to consume from a cloud based webservice and use the retrieved data to push to another cloud based web service.

Please suggest

* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Morten Wittrock
Dec 13, 2016 at 01:38 PM

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.



Show 3 Share
10 |10000 characters needed characters left characters exceeded

Thanks for the info Morten! Was also able to get the header details using ${in.headers}


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.


Thanks for sharing! Awesome stuff.