Skip to Content

Consuming REST Service without message body in response

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    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.



    Add comment
    10|10000 characters needed characters exceeded