B2B Integration

 View Only
Expand all | Collapse all

ITX - Error for Line Feed / New Line character in HTTP Request

  • 1.  ITX - Error for Line Feed / New Line character in HTTP Request

    Posted Mon May 04, 2020 12:42 PM
    I am trying to get the token from Internal URL.

    1st output card: httpPayload (Header) is below.

    "Content-Type: application/x-www-form-urlencoded" + "<NL>" + "<NL>" +"client_id=1E&client_secret=M!%r8&grant_type=client_credentials&scope=Carrier"

    2nd Output card: Here is the Rule to get the token
    GET("HTTP" , "-URL http://url/token -METHOD POST -TV -HDR+ -TYPE application/x-www-form-urlencoded", package(httpPayload))

    The above code is Working when I do standalone testing from Windows machine.

    But When I deploy the the code in Linux and test from command server I am getting "Invalid Header data" error.

    So I have changed the "<NL>" + "<NL>" to "<LF>" + "<LF>". But now I am getting "Invalid Header data" error in Windows and Linux both.

    Can some one help me, what is the new line character I should use to make it work in Linux box.

    Also Could you please help me out, how to pass the header directly in GET command to reduce the number of output cards. (I want to remove my 1st output card) .

    Best regards,

    ------------------------------
    Hemachandra G
    ------------------------------

    #SupplyChain
    #B2BIntegration


  • 2.  RE: ITX - Error for Line Feed / New Line character in HTTP Request

    IBM Champion
    Posted Tue May 05, 2020 05:15 AM
    Please try:

    "Content-Type: application/x-www-form-urlencoded" + "<CR><LF>" + "<CR><LF>" +"client_id=1E&client_secret=M!%r8&grant_type=client_credentials&scope=Carrier"


    ------------------------------
    Paul Brett
     
    IBM Sterling Transformation Extender (ITX) Client Support
    ------------------------------