Skip to content
Advertisement

How to set boundary in RestAssured

I’m trying to create multipart POST call using RestAssured, but I don’t know how to get any boundary there. I tried this code, but it doesn’t work.

JavaScript

Log

JavaScript

Wanted result:

JavaScript

So, how do I get ——WebKitFormBoundary123 in the request multipart form?

UPDATE: If I use this:

JavaScript

I will get this, which still doesn’t look the same and it doesn’t work

JavaScript

Advertisement

Answer

I found out that auto-generated boundary is what I need and it’s not displayed in Rest Assured log, but it’s sent.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement