Я пытаюсь отправить запрос GET на URL-адрес с помощью заголовка «Auth-Service-Id: my_app», «Auth-Identifier: blaBlaBlabla», «Auth-Secret: myauth-secret» с использованием REST Assured, JUnit.
public class RestAPITest {
@Test
public void getRequestTime() throws URISyntaxException {
// Specify the base URL to the RESTful web service
Response response = RestAssured.get("https://myurl.com");
logger.log(Level.INFO, response.time() + " milliseconds");
int statusCode = response.getStatusCode();
logger.log(Level.INFO, "Expected response status code is 200. Recieved response status code is " + statusCode);
Assert.assertEquals(statusCode, 200);
logger.log(Level.INFO, "Response Body is " + response.body().asString());
}