jeudi 18 février 2021

restAssured multipart need for parameters order

I am in need of forcing multipart parameters order in restAssured. However, I couldn't find anywhere if it's even possible to have some kind of sort of multipart parameters.

What I need is that my file will be last of the parameters sent. Currently, it is the first.

 RestAssured.baseURI = "http://localhost:8000/";
 RequestSpecification request = RestAssured.given();

 request.header("Content-Type", "multipart/form-data");

 File file = new File("test.png");

 Map<String, String> requestParamsMap = new HashMap<String, String>();
 ....someParams...

 response = request.log()
                .all()
                .formParams(requestParamsMap)
                .multiPart("file", file);
                .post("/some/endPoint");




Aucun commentaire:

Enregistrer un commentaire