Skip to Content

Status 411 Error when doing a POST using HTTP

Dear Experts-

I am working on a scenario in which I need to retrieve the Access Token for which I need to perform an HTTP POST and then pass the token value to the next flow. I am trying to validate the credentials using SAP cloud platform integration services. I have built a sample integration flow and when trying to do a post am receiving status 411. I think this is content-length. The same query is working in POSTMAN client and is able to retrieve the access token. I am not sure if this is a limitation of standard HTTP adapter or is there a setting which can be done to resolve this issue. I have following configurations. I have also tried to use Content_Length in content modifier and providing length value as 128 MB. No luck.

Appreciate the support.

Regards

HS

http1.png (83.5 kB)
http2.png (67.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Jun 20, 2018 at 05:47 PM

    I resolved the issue. The issue was with HTTP adapter in HCI, as it was expecting a body though it is technically not needed. In content modifier step provided a dummy body and it was sucessfully. I have mentioned the same to SAP as a HTTP bug. Hope they resolve this issue in future.

    Thanks for all the support as always.

    Regards

    HS

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Hari,

      Now can you make a request-reply flow successfully to an external server via HTTP POST with body given in Sender URL Body? I know hard-code the request body in Content-Modifier works.

      Regards,

      Guoquan

  • Jun 15, 2018 at 03:18 PM

    Hi Hari,

    I don't clearly understand the question. But if the call is working through Postman and not through CPI Ifow, then may be some headers are set. You can refer to the below blog to clear them:

    https://blogs.sap.com/2018/01/18/sap-cpi-clearing-the-headers-reset-header/

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 03 at 06:09 AM

    Hi Hari,

    I am encountering the exactly same error (HTTP error 411) while doing HTTP POST.

    You said you fixed it by providing dummy body.

    What does that mean?

    I added one "Content Modifier" step before call HTTP POST with no value in the message body box.

    But still got same error. What else I can try?

    Thanks.

    Regards,

    Nick

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 04 at 05:47 AM

    Thank you Hari.

    This trick doesn't work to me.


    Add comment
    10|10000 characters needed characters exceeded

  • Apr 04 at 07:33 PM

    Is your API call working in POSTMAN? If yes then please send me the details. I will check on my side.

    Regards

    HS

    Add comment
    10|10000 characters needed characters exceeded