Reputation: 33
I am trying to call a POST method which accepts the below form parameters
Path – A string specifying the path FileName - A binary file Media Type: multipart/form-data
Below code helps with the binary file part Given multipart file xxx= { read: 'classpath:xxx', filename: 'xxx'}
However, in the same request I need to pass the string parameter as well.
Please suggest a way.
Thanks, Kanika
Upvotes: 1
Views: 912
Reputation: 58058
You can combine multipart field
with multipart file
, refer to this demo example also.
Given multipart file xxx = { read: 'classpath:xxx', filename: 'xxx' }
And multipart field yyy = 'myvalue'
Upvotes: 2