Je suis en train d'appeler un service de repos via notre proxy d'entreprise, mais continuer à obtenir la réponse:Comment authentifier un appel de repos derrière un proxy d'entreprise en utilisant Rest-Assured?
407 Proxy Authentication Required. Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied.
Quelqu'un peut-il suggérer autre chose que je peux essayer, ou une alternative à RestAssured qui prend en charge NTLM?
Ceci est mon code actuel:
PreemptiveBasicAuthScheme auth = new PreemptiveBasicAuthScheme();
auth.setUserName("my username");
auth.setPassword("my password");
// was getting desperate so tried adding this
System.setProperty("http.proxyHost", "XXXX");
System.setProperty("http.proxyPort", "8080");
System.setProperty("http.proxyUser", "my username");
System.setProperty("http.proxyPassword", "my password");
System.setProperty("https.proxyHost", "XXXX");
System.setProperty("https.proxyPort", "8080");
System.setProperty("https.proxyUser", "my username");
System.setProperty("https.proxyPassword", "my password");
Response r = RestAssured
.given()
// tried with and without this
.header("Proxy-Authorization", auth.generateAuthToken())
.proxy("XXXX", 8080)
.get(fullPath, key, key);
Si vous trouvez une solution de contournement alors s'il vous plaît créer un problème à la question reste tracker assuré (https://github.com/jayway/rest-assured/issues) et je vais essayer de l'intégrer plus agréable. – Johan