Получение ответа в виде «Response: tcp_error: Произошла ошибка связи:« Тайм-аут операции »
»
Из POSTMAN / Curl
curl -X POST \
http://IP:PORT/{endpoint} \
-H 'Accept: application/json' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Length: 5' \
-H 'Content-Type: application/json' \
-H 'Host: IP:PORT' \
-H 'Postman-Token: 053670e6-44d4-4d03-96bf-ab1178b02d06,ffad205d-320a-4cd0-a63d-1687873fbf1d' \
-H 'User-Agent: PostmanRuntime/7.19.0' \
-H 'appkey: ACTUAL APP KEY' \
-H 'cache-control: no-cache' \
-d '{
}'
Rest Assured code для вышеуказанного API
RestAssured.baseURI = “http://IP”;
RestAssured.port = port;
RestAssured.useRelaxedHTTPSValidation();
Response response = RestAssured.given()
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.header("appkey", “ACTUAL APPKEY”)
.when()
.get(“ENDPOINT”);
System.out.println("Response: " + response.asString());