You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E.g.
expect().body("root.child", equalTo("x")).when("/jsonp?callback=y");
But perhaps it's better/easier to do something like:
expect().jsonp("callback", "y").body("root.child",
equalTo("x")).when().get("/jsonp");
or:
expect().jsonp("callback").body("root.child",
equalTo("x")).when().get("/jsonp");
which should generate a random method-name.
It should also be possible to set it as default:
RestAssured.expectedParser = jsonp("callback", "y");
RestAssured.expectedParser = jsonp("callback");
RestAssured.expectedParser = auto(); // Default
There should also be a JsonpPath that simply extends JsonPath and removes
method call.
Original issue reported on code.google.com by johan.ha...@gmail.com on 10 Mar 2011 at 2:00
The text was updated successfully, but these errors were encountered:
If using:
expect().body("root.child", equalTo("x")).when("/jsonp?callback=y");
we can try to detect whether or not the response is JSONP or plain JSON by e.g.
using reg exp.
Original comment by johan.ha...@gmail.com on 10 Mar 2011 at 2:03
Perhaps jsonp spec should be in the request spec instead? E.g.
given().
jsonp("callback").
expect().
body("root.child", equalTo("x")).
when().
get("/jsonp");
Original comment by johan.ha...@gmail.com on 22 Mar 2011 at 6:15
Original issue reported on code.google.com by
johan.ha...@gmail.com
on 10 Mar 2011 at 2:00The text was updated successfully, but these errors were encountered: