Forum Discussion

Maksym_Khymii's avatar
Maksym_Khymii
Regular Visitor
3 years ago

POST multi/form-data cause error

Hi. Using SoapUI Pro 5.1.2 version.

Execute attached POST request but get the error: 400 error Cannot read property 'data' of null.

The same request works well in Postman and Fiddler.

Seems SoapUI specific issue. Could you help to resolve that?

 

 

1 Reply

  • richie's avatar
    richie
    Community Hero

    Hey Maksym_Khymii 

     

    Your 'MediaType' attribute value is incorrect.  According to your screenshot, you've specified it as 'form-data' - but this isn't a valid value.

     

    Replace 'form-data' with 'application/x-www-form-urlencoded'.  The MediaType dropdown generates the 'Content-Type' HTTP header value in your request

     

    Also - in your payload you have included HTTP headers (Content-Type, Content-Transfer-Encoding, 'Content-Disposition) - you shouldn't be specifying these in the payload.

     

    Also - it looks like you're setting the boundaries yourself in the payload - if setup correct, these are dynamically generated.  You should include JUST the payload and nothing else.

     

    Hope this helps!

     

    Cheers,

     

    Rich