1- # coding: utf-8
21"""
3- Copyright (c) 2022 Aspose.Cells Cloud
4- Permission is hereby granted, free of charge, to any person obtaining a copy
5- of this software and associated documentation files (the "Software"), to deal
6- in the Software without restriction, including without limitation the rights
7- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8- copies of the Software, and to permit persons to whom the Software is
9- furnished to do so, subject to the following conditions:
10-
11- The above copyright notice and this permission notice shall be included in all
12- copies or substantial portions of the Software.
13-
14- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2+ <copyright company="Aspose" file="api_clientpy.cs">
3+ Copyright (c) 2023 Aspose.Cells Cloud
4+ </copyright>
5+ <summary>
6+ Permission is hereby granted, free of charge, to any person obtaining a copy
7+ of this software and associated documentation files (the "Software"), to deal
8+ in the Software without restriction, including without limitation the rights
9+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+ copies of the Software, and to permit persons to whom the Software is
11+ furnished to do so, subject to the following conditions:
12+
13+ The above copyright notice and this permission notice shall be included in all
14+ copies or substantial portions of the Software.
15+
16+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+ SOFTWARE.
23+ </summary>
2024"""
25+ # coding: utf-8
2126
2227from __future__ import absolute_import
2328
@@ -83,7 +88,7 @@ def __init__(self, host=None, header_name=None, header_value=None, cookie=None):
8388 self .host = host
8489 self .cookie = cookie
8590 # Set default User-Agent.
86- self .user_agent = 'Aspose.Cells.Cloud /23.8 /python'
91+ self .user_agent = 'Swagger-Codegen /23.11 /python'
8792
8893 @property
8994 def user_agent (self ):
@@ -139,7 +144,7 @@ def __call_api(self, resource_path, method,
139144 # body
140145 if body :
141146 body = self .sanitize_for_serialization (body )
142-
147+
143148 # post parameters
144149 if post_params or files :
145150 body = None
@@ -158,7 +163,7 @@ def __call_api(self, resource_path, method,
158163
159164 # request url
160165 url = self .host + resource_path
161-
166+
162167 preload_content = _preload_content
163168 if response_type == 'file' :
164169 preload_content = False
@@ -553,7 +558,7 @@ def __deserialize_file(self, response):
553558 os .close (fd )
554559 os .remove (path )
555560
556- content_disposition = response .headers . get ("Content-Disposition" )
561+ content_disposition = response .getheader ("Content-Disposition" )
557562 if content_disposition :
558563 filename = re .\
559564 search (r'filename=[\'"]?([^\'"\s]+)[\'"]?' , content_disposition ).\
@@ -745,4 +750,4 @@ def get_access_token(self, grant_type, client_id, client_secret, version, **kwar
745750 _preload_content = params .get ('_preload_content' , True ),
746751 _request_timeout = params .get ('_request_timeout' ),
747752 collection_formats = collection_formats )
748- return data [0 ].access_token
753+ return data [0 ].access_token
0 commit comments