Skip to content

Commit

Permalink
basic authenticate user pass in java snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
SMony-L committed Apr 26, 2021
1 parent 60d7689 commit 0740b42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions content-by-language/java/outbound-integration.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

public class OutboundIntegration {
public static void main(String[] args) throws IOException, InterruptedException, GeneralSecurityException {
System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
final String proxyHost = "{VAULT_HOST}";
final var proxyPort = {PORT};
final String proxyUser = "{USERNAME}";
Expand All @@ -42,6 +43,7 @@ public static void main(String[] args) throws IOException, InterruptedException,
.build();
final HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());

System.out.println("status code=" + response.statusCode());
System.out.println("response=" + response.body());
}

Expand Down

0 comments on commit 0740b42

Please sign in to comment.