rest-assured: Proxy not used when call https based service
Our proxy http://corporate.proxy:8080 should be used for all protocols.
Am I using the RestAssurred proxy incorrectly when making an HTTPS rest call or is this not currently supported?
NOTE: I’m testing against “https://jsonplaceholder.typicode.com” as its the only public https rest api I can find.
PreemptiveBasicAuthScheme auth = new PreemptiveBasicAuthScheme();
auth.setUserName("XXXX");
auth.setPassword("XXXX");
String url = "https://jsonplaceholder.typicode.com/posts";
Response r2 = RestAssured
.given()
.header("Proxy-Authorization", auth.generateAuthToken())
.proxy("corporate.proxy", 8080)
.get(url);
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 15
Whoohoo! Finally able to talk through the proxy via https. I don’t know if you will be able to adapt this for RestAssured but here is the solution: