IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online 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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  how to send attachment as form data with http post call

    Posted 01/24/20 08:34 AM

    Hi All,

    Please let me know how can we use the http post call to send attachment as form data to end system.

    Thanks in advance

    Monica


    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: how to send attachment as form data with http post call

    Posted 01/27/20 10:24 AM

    Multipart form-data is used to send multiple attachments of different types in single post request.
    Below are the steps

    in http headers create 2 parameters
    1 Content-Type: multipart/form-data;
    2.boundary=---------------------------TESTBOUNDRY

    encode your file image or pdf which you want to send and map to bytes
    and in args you can create below 4 paraments
    Content-Disposition: form-data;
    name=“file1”;
    filename=“a.jpeg”
    Content-Type: image/jpeg

    info:
    ---------------------------TESTBOUNDRY ;begining of the boundry
    ---------------------------TESTBOUNDRY-- ;ending of the boundry

    your http post request should look like this when you extend the logs.

    POST / HTTP/1.1
    Host: localhost:5555
    Content-Type: multipart/form-data; boundary=---------------------------TESTBOUNDRY
    Content-Length: 554

    -----------------------------TESTBOUNDRY
    Content-Disposition: form-data; name=“file1”; filename=“a.jpeg”
    Content-Type: image/jpeg

    zfuzf8767432841kg95176985$%$§dsf$§"%72

    -----------------------------TESTBOUNDRY–


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: how to send attachment as form data with http post call

    Posted 10/20/20 12:50 PM

    I am also facing same issue . d you able to resolve the issue for multipart


    #webMethods
    #Integration-Server-and-ESB