-
Notifications
You must be signed in to change notification settings - Fork 47
Feature: Add request hooks #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
ed7968c
939c60c
ce37d7e
a6f85ca
94d33c5
6fa48f1
99d0f6b
4b9b26a
b7443d9
3eb39eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -187,6 +187,7 @@ class DICOMwebClient { | |
| } | ||
|
|
||
| if (requestInterceptors) { | ||
| console.debug('yes') | ||
| const metadata = { method, url }; | ||
| const pipeRequestInterceptors = functions => (args) => functions.reduce((args, fn) => fn(args, metadata), args); | ||
|
||
| const pipedRequest = pipeRequestInterceptors(requestInterceptors); | ||
|
|
@@ -212,7 +213,10 @@ class DICOMwebClient { | |
| * @private | ||
| */ | ||
| _httpGet(url, headers, responseType, progressCallback) { | ||
| return this._httpRequest(url, "get", headers, { responseType, progressCallback }); | ||
| return this._httpRequest(url, "get", headers, { | ||
| responseType, | ||
| progressCallback | ||
| }); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -648,7 +652,10 @@ class DICOMwebClient { | |
| * @returns {Promise} Response | ||
| */ | ||
| _httpPost(url, headers, data, progressCallback) { | ||
| return this._httpRequest(url, "post", headers, { data, progressCallback }); | ||
| return this._httpRequest(url, "post", headers, { | ||
| data, | ||
| progressCallback | ||
| }); | ||
| } | ||
|
|
||
| /** | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.