我想在 API 正文中作为多部分表单发送以下POST 请求:
上传传递两个属性 (KEY) 和 (VALUE) 发送 arquivo (KEY) 和 (file) 如何使用 REST-Assured
尝试:
Response response = (Response)
given()
.relaxedHTTPSValidation()
.header("Content-Type", "multipart/form-data")
.formParam("tipo", "capital_relatorio_faturamento")
.multiPart("arquivo", file, "image/jpg")
enter code here
------------------------------
.formParam("arquivo", "image/jpg")
.multiPart("tipo", "capital_balanco_patrimonial")
.multiPart("arquivo",file)
-------------------------------
.header("Content-Type", "multipart/form-data")
.multiPart("tipo", "capital_comprovante_endereco")
.multiPart("arquivo",file)```