@@ -2043,8 +2043,6 @@ def get_authentication(self, *, token_storage=None):
20432043 Authentication object compatible with the generated SDK (box_sdk_gen).
20442044 :raises ValueError:
20452045 If the authentication type is not supported or required credentials are missing.
2046- :raises ValueError:
2047- If the authentication type is not supported or required credentials are missing.
20482046 """
20492047 oauth = self ._oauth
20502048
@@ -2207,7 +2205,6 @@ def get_network_session(
22072205 network_client = None ,
22082206 retry_strategy = None ,
22092207 data_sanitizer = None ,
2210- interceptors = None ,
22112208 additional_headers = None ,
22122209 ):
22132210 """
@@ -2222,8 +2219,6 @@ def get_network_session(
22222219 If not provided, one will be created from legacy retry settings.
22232220 :param data_sanitizer:
22242221 Optional DataSanitizer instance for the generated SDK.
2225- :param interceptors:
2226- Optional list of request/response interceptors.
22272222 :param additional_headers:
22282223 Optional dictionary of additional HTTP headers to merge with legacy headers.
22292224 :return:
@@ -2275,9 +2270,14 @@ def get_network_session(
22752270 if hasattr (proxy_config , 'AUTH' ) and proxy_config .AUTH :
22762271 auth = proxy_config .AUTH
22772272 if isinstance (auth , dict ) and 'user' in auth and 'password' in auth :
2273+ scheme = (
2274+ proxy_url .split ('://' , 1 )[0 ] if '://' in proxy_url else 'http'
2275+ )
22782276 # Extract host from URL
22792277 host = proxy_url .split ('//' )[1 ] if '//' in proxy_url else proxy_url
2280- proxy_url = f"http://{ auth ['user' ]} :{ auth ['password' ]} @{ host } "
2278+ proxy_url = (
2279+ f"{ scheme } ://{ auth ['user' ]} :{ auth ['password' ]} @{ host } "
2280+ )
22812281
22822282 # Merge custom headers
22832283 headers = {}
@@ -2314,7 +2314,6 @@ def get_sdk_gen_client(self, *, auth_options=None, network_options=None):
23142314 - network_client: Custom NetworkClient instance
23152315 - retry_strategy: Custom RetryStrategy instance
23162316 - data_sanitizer: Custom DataSanitizer instance
2317- - interceptors: List of request/response interceptors
23182317 - additional_headers: Dictionary of additional HTTP headers
23192318 :return:
23202319 BoxClient instance from box_sdk_gen, fully configured with shared settings.
@@ -2333,7 +2332,6 @@ def get_sdk_gen_client(self, *, auth_options=None, network_options=None):
23332332 'network_client' : network_options .get ('network_client' ),
23342333 'retry_strategy' : network_options .get ('retry_strategy' ),
23352334 'data_sanitizer' : network_options .get ('data_sanitizer' ),
2336- 'interceptors' : network_options .get ('interceptors' ),
23372335 'additional_headers' : network_options .get ('additional_headers' ),
23382336 }
23392337
0 commit comments