App Connect

App Connect

Join this online user group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#Applicationintegration
#App Connect
#AppConnect
 View Only
  • 1.  Overriding Content Type

    Posted Tue July 27, 2021 01:29 PM
    Hi Team
         I am passing the JSON Data to Request Node. But my HttpRequestNode is sending
        the content type as application/xml for my API.

       Due to that I am getting below error.
      2021-07-27 22:31:23.520 WARN 17112 --- [nio-8082-exec-4] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpMediaT
    ypeNotSupportedException: Content type 'text/xml;charset=utf-8' not supported]
     
    Is there any way to override the content type in compute node? How to sent the custom headers to HttpRequestNode?

    ------------------------------
    SELVAKUMAR ANANTHARAJ
    ------------------------------


  • 2.  RE: Overriding Content Type

    Posted Wed July 28, 2021 01:08 AM

    Hi,

    Yes you can set the "Content-Type" and other HTTP headers for your request using ESQL, Mapping etc as detailed in this topic Working with HTTP flows.

    SET OutputRoot.HTTPReplyHeader."Content-Type" = 'application/json';


    ------------------------------
    Martin Boag
    Software Developer
    IBM
    ------------------------------