Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit923d7e4

Browse files
committed
add Proxy support (via config's option) to internal JDKHttpClient (thanks tohttps://github.com/bjournaud)
1 parent3b0c0e1 commit923d7e4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[SNAPSHOT]
2+
* add Proxy support (via config's option) to internal JDKHttpClient (thanks to https://github.com/bjournaud)
23

34
[7.0.0]
45
* Add Polar API (https://www.polar.com/) (thanks to https://github.com/vidi42)

‎scribejava-core/src/main/java/com/github/scribejava/core/httpclient/jdk/JDKHttpClient.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@ public Response execute(String userAgent, Map<String, String> headers, Verb http
114114

115115
privateResponsedoExecute(StringuserAgent,Map<String,String>headers,VerbhttpVerb,StringcompleteUrl,
116116
BodyTypebodyType,ObjectbodyContents)throwsIOException {
117+
finalURLurl =newURL(completeUrl);
117118
finalHttpURLConnectionconnection;
118119
if (config.getProxy() ==null) {
119-
connection = (HttpURLConnection)newURL(completeUrl).openConnection();
120-
}else {
121-
connection = (HttpURLConnection)newURL(completeUrl).openConnection(config.getProxy());
120+
connection = (HttpURLConnection)url.openConnection();
121+
}else {
122+
connection = (HttpURLConnection)url.openConnection(config.getProxy());
122123
}
123124
connection.setInstanceFollowRedirects(config.isFollowRedirects());
124125
connection.setRequestMethod(httpVerb.name());

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp