You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
fkrivsky
changed the title
Can't start proxy on custom port with java tools like RestAssured and Java 11 HTTP Client
Can't start proxy on custom port with Java 10+
Dec 16, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The text was updated successfully, but these errors were encountered: