Skip to content

Instantly share code, notes, and snippets.

@RobertoPegoraro
Last active May 27, 2019 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertoPegoraro/f8eac21e2cc98654e53e1aa3438ebbf2 to your computer and use it in GitHub Desktop.
Save RobertoPegoraro/f8eac21e2cc98654e53e1aa3438ebbf2 to your computer and use it in GitHub Desktop.
How to extract Object from data using Rest Assured
User user = given()
                .when()
                .get("https://reqres.in/api/unknown/2")
                .then()
                .extract()
                .jsonPath()
                .getObject("data", User.class);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment