fork download
  1. import io.restassured.RestAssured;
  2. import io.restassured.response.Response;
  3.  
  4.  
  5. public class GetRequestExample {
  6. public static void main(String[] args) {
  7. Response response = RestAssured.get("https://r...content-available-to-author-only...s.in/api/users?page=2");
  8.  
  9. // Print response body
  10. System.out.println(response.getBody().asString());
  11.  
  12. // Validate status code
  13. response.then().statusCode(200);
  14. }
  15. }
Success #stdin #stdout 0.08s 54336KB
stdin
Standard input is empty
stdout
Hello