DataPower

 View Only
  • 1.  DataPower multipart/form-data

    Posted Wed June 07, 2023 11:16 AM

    Dear Team,

    I have below case that the back-end require below information to be consumed :

    host: https://www.test.text/v1/api/auth

    method : post

    content-type : multipart/form-data; boundary=test123

    username: xyz

    password : pwd123

    please your support on how to write it as GatewayScript?

    Best Regards.



    ------------------------------
    Abdullah Ibrahim
    ------------------------------


  • 2.  RE: DataPower multipart/form-data

    Posted Wed June 07, 2023 02:02 PM

    Setting protocol headers is documented here: header class methods

    And to set the authentication headers, please see the section on the User Agent in the XML Manager as you probably shouldn't hard code the authentication values in your Gateway Script.

    Ibm remove preview
    header class methods
    The methods that are provided by the header class.
    View this on Ibm >



    ------------------------------
    --Charlie Sumner
    ------------------------------



  • 3.  RE: DataPower multipart/form-data

    Posted Wed June 14, 2023 10:35 AM

    Please make sure that your lines are terminated with CRLF, because HTTP spec requires that for HTTP header lines.



    ------------------------------
    Hermann Stamm-Wilbrandt
    Compiler Level 3 support & Fixpack team lead
    IBM DataPower Gateways (⬚ᵈᵃᵗᵃ / ⣏⠆⡮⡆⢹⠁⡮⡆⡯⠂⢎⠆⡧⡇⣟⡃⡿⡃)
    https://stamm-wilbrandt.de/en/blog/
    ------------------------------