REST Assured 1.4.5
Highlights
Section titled “Highlights”-
Better support for cookies:
-
You can now create multi-value cookies using e.g.
given().cookie("cookieName", "value1", "value2"). ..This will create two cookies,
cookieName=value1andcookieName=value2. -
Fixed a serious issue with the cookie parsing that caused cookie attributes to be parsed as a new cookie (issue 130).
-
Support for getting detailed cookies using the Response.getDetailedCookies() method. You can also get a single detailed cookie using the Response.getDetailedCookie(java.lang.String) method. Detailed cookies contains e.g. comment, path and expiry date.
-
Creation of detailed cookies:
Cookie someCookie = new Cookie.Builder("some_cookie", "some_value").setSecured(true).build();given().cookie(someCookie).and().expect().body(equalTo("x")).when().get("/cookie"); -
Better support for headers: You can now create multi-value headers using e.g.
given().header("headerName", "value1", "value2"). ..This will create two headers,
headerName=value1andheaderName=value2.
Non-backward compatible changes
Section titled “Non-backward compatible changes”- To allow for multi-value headers the old Response.getHeaders() and Response.headers() no longer returns
Map<String,String>. Now these methods returns a Headers instance instead.
Other notable changes
Section titled “Other notable changes”-
Added support for serializing objects to a parameter if the content-type is set:
given().contentType("application/json").queryParam("category", "Games").formParam("object", new GameObject(..)). // GameObject will be serialized to JSONwhen().post("/somewhere"); -
Added support for mapping a path to a Java object in JsonPath, e.g:
Book book = from(JSON).getObject("store.book[2]", Book.class);Minor changes
Section titled “Minor changes”See change log for more details

