Release 0.2.19: Update Fern TS SDK (#3807)
This commit is contained in:
committed by
GitHub
parent
5872e3cde0
commit
43048b1c12
@@ -41,10 +41,7 @@ export class Scripts {
|
||||
): Promise<core.WithRawResponse<unknown>> {
|
||||
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
||||
this._options?.headers,
|
||||
mergeOnlyDefinedHeaders({
|
||||
"x-api-key": requestOptions?.apiKey ?? this._options?.apiKey,
|
||||
...(await this._getCustomAuthorizationHeaders()),
|
||||
}),
|
||||
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
|
||||
requestOptions?.headers,
|
||||
);
|
||||
const _response = await core.fetcher({
|
||||
@@ -94,9 +91,4 @@ export class Scripts {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected async _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>> {
|
||||
const xApiKeyValue = await core.Supplier.get(this._options.xApiKey);
|
||||
return { "x-api-key": xApiKeyValue };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user