Данные успешно появляются при выполнении из Почтальона, но при выполнении скрипта из JAVA я получаю
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/C:/Users/****/.m2/repository/org/codehaus/groovy/groovy/2.5.8/groovy-2.5.8.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.net.UnknownHostException: No such host is known (ar****-test****)
Код:
String token = "eyJh******";
Response response = given().headers("Authorization", "Bearer " + token, "Content-Type", ContentType.JSON, "Accept", ContentType.JSON)
.when()
.get("https://ar*****-test.*******")
.then()
.contentType(ContentType.JSON)
.extract()
.response();
Данные от Почтальона получены в JSON формат.