I want to send below as a form-data in API Body for a PUT request:
How to do this using REST-Assured
Attached is the screenshot Form-Data Image
You need to set desired content type i.e "multipart/form-data" and add the multipart request specs to the request. Eg.
given()
.contentType("multipart/form-data")
.multiPart("file", "filename")
.multiPart("key", "value")
.when()
.put(endpoint);