I have a cURL that takes a file checksum and xml along with multiple headers in order to upload an image to a server.Im not very familiar with RestAssured so my question is;How do i represent the -F cURL values in RestAssured?
`curl -s -w "\nHTTP %{http_code}\n" -X POST ${mediaUrl}/api/user/${LCID}/repository/${REPO_NAME}/file?conflictSolve=copy \-H "Accept: application/vnd.******.dv-1.19+xml" \-H "Content-Type: multipart/form-data" \-H "Authorization: *** token=\"${TOKEN}\"; authVersion=\"1.0\"" \-H "x-******-***: ${TOKEN}" \-H "X-Client-Identifier: TEST" \-H "X-Client-Platform: CURL" \-H "x-ingest-tag:RI" \-F "files=@${XML};type=application/vnd.******.dv-1.19+xml" \-F "${checksum}=@${file};type=${mimeType}"`
Currently i have progressed with the only the headers.
Response response = given() .log().all() .spec(RestUtilities.get**RequestSpecification()) .header("Accept","application/vnd.******.dv-1.19+xml") .header("Content-Type", "multipart/form-data") .header("Authorization", "*** token=\""+access_token+"\"; authVersion=\"1.0\";") .header("x-*****-***", "access_token") .when() .post() .then() .log().all() .statusCode(200) .extract() .response();}
}