Advertisement
pics23

restassured request with queries

Jun 13th, 2020
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. public static Response getYaRealty(String pageNumber) {
  2. RestAssured.defaultParser = Parser.JSON;
  3.  
  4. return
  5. given().queryParam("count", "75").queryParam("zoom", "15.2")
  6. .queryParam("rgid", "417899").queryParam("type", "RENT")
  7. .queryParam("category", "APARTMENT")
  8. .queryParam("roomsTotal", "1").queryParam("roomsTotal", "2")
  9. .queryParam("roomsTotal", "3")
  10. .queryParam("leftLongitude", "30.392963")
  11. .queryParam("bottomLatitude", "59.958688")
  12. .queryParam("rightLongitude", "30.440821")
  13. .queryParam("topLatitude", "59.971987")
  14. .queryParam("crc", "y896a17534681c14f9f8394df2d922d19")
  15. .queryParam("_format", "react").queryParam("_pageType", "search")
  16. .queryParam("_providers", "react-search-data")
  17. .queryParam("page", String.format("%s", pageNumber))
  18. .headers("Content-Type", ContentType.JSON, "Accept", ContentType.JSON).
  19. when().get("https://realty.yandex.ru/gate/react-page/get/").
  20. then().contentType(ContentType.JSON).extract().response();
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement