0.0.10: Added ApiCallOptions to the getHeaders call.
This commit is contained in:
Родитель
81a9232960
Коммит
0e4f3a843a
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "simplerestclients",
|
||||
"version": "0.0.9",
|
||||
"version": "0.0.10",
|
||||
"description": "A library of components for accessing RESTful services with javascript/typescript.",
|
||||
"author": "David de Regt <David.de.Regt@microsoft.com>",
|
||||
"scripts": {
|
||||
|
|
|
@ -64,7 +64,7 @@ export class GenericRestClient {
|
|||
private _performApiCallInternal<T>(apiPath: string, action: HttpAction, options: ApiCallOptions)
|
||||
: SyncTasks.Promise<WebResponse<T>> {
|
||||
if (!options.headers) {
|
||||
options.headers = this._getHeaders();
|
||||
options.headers = this._getHeaders(options);
|
||||
}
|
||||
|
||||
if (options.eTag) {
|
||||
|
@ -84,7 +84,7 @@ export class GenericRestClient {
|
|||
});
|
||||
}
|
||||
|
||||
protected _getHeaders(): { [header: string]: string } {
|
||||
protected _getHeaders(options: ApiCallOptions): { [header: string]: string } {
|
||||
// Virtual function -- No-op by default
|
||||
return {};
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче