add option to skip setting user agent in js client (#20367)

This commit is contained in:
William Cheng
2024-12-22 23:11:54 +08:00
committed by GitHub
parent 5ba608ff8a
commit ab8d359dc3
6 changed files with 47 additions and 30 deletions

View File

@@ -52,15 +52,6 @@ class ApiClient {
'bearer_test': {type: 'bearer'}, // JWT
}
/**
* The default HTTP headers to be included for all API calls.
* @type {Array.<String>}
* @default {}
*/
this.defaultHeaders = {
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript'
};
/**
* The default HTTP timeout for all API calls.
* @type {Number}
@@ -76,7 +67,7 @@ class ApiClient {
*/
this.cache = true;
/**
/**
* If set to true, the client will save the cookies from each server
* response, and return them in the next request.
* @default false