Skip to content

Commit e497fbe

Browse files
feat: Add withProxy method to BoxClient (box/box-codegen#831) (#1425)
1 parent cc53247 commit e497fbe

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "ee965c4", "specHash": "a05e5d7", "version": "0.1.0" }
1+
{ "engineHash": "8123fde", "specHash": "a05e5d7", "version": "0.1.0" }

src/main/java/com/box/sdkgen/client/BoxClient.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
import com.box.sdkgen.networking.fetchresponse.FetchResponse;
9090
import com.box.sdkgen.networking.interceptors.Interceptor;
9191
import com.box.sdkgen.networking.network.NetworkSession;
92+
import com.box.sdkgen.networking.proxyconfig.ProxyConfig;
9293
import java.util.List;
9394
import java.util.Map;
9495

@@ -981,6 +982,12 @@ public BoxClient withCustomBaseUrls(BaseUrls baseUrls) {
981982
.build();
982983
}
983984

985+
public BoxClient withProxy(ProxyConfig config) {
986+
return new BoxClient.Builder(this.auth)
987+
.networkSession(this.networkSession.withProxy(config))
988+
.build();
989+
}
990+
984991
public BoxClient withInterceptors(List<Interceptor> interceptors) {
985992
return new BoxClient.Builder(this.auth)
986993
.networkSession(this.networkSession.withInterceptors(interceptors))

0 commit comments

Comments
 (0)