We are automating multiple proxies initialization on custom ports using REST Assured (or and Java 11 HTTP client).
Attempts to start proxy on custom port with POST calls using the aforementioned tools end up with proxy starting but not on specified port.
Code for REST Assured:
String body = "{\"port\":\""+ port +"\"}";
var response = given()
.accept("application/json")
.contentType("application/json")
.body(body)
// .log().all()
.when()
.post(proxyAddress)
.then()
.log().ifError();
HTTP/1.1 200 OK
Date: Wed, 25 Nov 2020 17:58:25 GMT
Content-Type: application/json
Content-Length: 13
Server: Jetty(9.4.20.v20190813)
{
"port": 8088
}
Java client log:
[port:10001
{"port":8088}]
Expected behavior
Proxy should be started on the specified port.
Please complete the following information:
OS: Windows 10, Linux
Java: 11
Versions: 2.0.1, 2.1.0, 2.1.1
Additional context
Using curl for starting the proxy seems to work fine however it does not fit in our workflow.
Other POST call using REST Assured works fine - specifically, we are sending JSON-formatted hosts entries to http://(address}:8080/proxy/{port}/hosts and that is without problem.
245 seems to provide information about root cause - however it was closed without resolution.
Describe the bug
We are automating multiple proxies initialization on custom ports using REST Assured (or and Java 11 HTTP client). Attempts to start proxy on custom port with POST calls using the aforementioned tools end up with proxy starting but not on specified port.
Code for REST Assured:
Code for Java HTTP client:
To Reproduce
Steps to reproduce the behavior:
REST Assured logs:
Example of request:
Respective response:
Java client log:
Expected behavior
Proxy should be started on the specified port.
Please complete the following information:
Additional context
Using curl for starting the proxy seems to work fine however it does not fit in our workflow.
Other POST call using REST Assured works fine - specifically, we are sending JSON-formatted hosts entries to http://(address}:8080/proxy/{port}/hosts and that is without problem.
245 seems to provide information about root cause - however it was closed without resolution.