File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,11 @@ async function callTool(
126
126
if ( [ 'GET' , 'DELETE' ] . includes ( method || '' ) ) body = null ;
127
127
128
128
const request = new OpenApi . OpenApiRequest ( { query, body } ) ;
129
- const runtime = new Util . RuntimeOptions ( { } ) ;
129
+ // runtime default settings https://github.com/aliyun/tea-util/blob/5f4bdebef3b57d33207b6bc44af6ed5e1a009959/ts/test/client.spec.ts#L133
130
+ const runtime = new Util . RuntimeOptions ( {
131
+ readTimeout : process . env . OPEN_API_READ_TIMEOUT ? Number ( process . env . OPEN_API_READ_TIMEOUT ) : 10000 ,
132
+ connectTimeout : process . env . OPEN_API_CONNECT_TIMEOUT ? Number ( process . env . OPEN_API_CONNECT_TIMEOUT ) : 10000 ,
133
+ } ) ;
130
134
// 查看 https://github.com/aliyun/darabonba-openapi/blob/master/ts/src/client.ts
131
135
const res = await ( agent as any ) ?. callApi ?.( apiRequestConfigs , request , runtime ) ;
132
136
let result : IAlibabaCloudOpenApiJsonResponse [ 'body' ] | null = null ;
You can’t perform that action at this time.
0 commit comments