Forum Discussion

gaurav090187's avatar
gaurav090187
New Contributor
6 years ago

How to pass multipart/form-data request schema in POST Request?

I have the below request schema which I want to send as form-data while sending POST request in SOAPUI PRO. Can any one please help me out on how to handle this? code: "FORM991" gradeDisplayC...
  • richie's avatar
    6 years ago

    Hi gaurav090187 

     

    I had to use the multipart/form-data type a while back and it caused me so many problems - however - this is the answer that @Nastya_Khovrina came back with - (i think part of the problem is its an old way of doing things) essentially build the form content as query parms rather than add the payload attributes and values in to the payload section of the request form.  I managed to get it working only once when I tried populating the payload field.

     

    Anyway - Anastacia's approach was as below:

     

    You can do the following:

    1. Specify your properties as query parameters of a request.

    2. Check the Post QueryString option.

    3. Don't forget to clear the Request form (below the Media Type dropdown)

    Please see the screenshot:

    ReadyAPI_2019-07-01_13-30-12.png

     

    Here is what you'll get as a result:

     

    ReadyAPI_2019-07-01_13-30-33.png

     

    Also, here are some useful resources:

    LearnUpon: https://smartbearacademy.learnupon.com/enrollments/25031374

    YouTube: https://www.youtube.com/watch?v=iL-zehJmtWw&list=PLrA5ciulugn_w0pW1_SSyfucD-k5Fasj_&index=5

     

    Cheers,

     

    rich