RestAssured – how to do GET request.

Use queryParam to create GET reqeust
RestAssured.baseURI = apiUrl;

RequestSpecification request = RestAssured.given();

//Add token to request
request.header("Authorization", token);

// Add a header stating the Request body is a JSON
request.header("Content-Type", "application/json");

// Add trxID to query param
request.queryParam("trxId", trxId);

Leave a Reply

Your email address will not be published. Required fields are marked *