aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/requests/requests.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/requests/requests.ts')
-rw-r--r--shared/extra-utils/requests/requests.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/shared/extra-utils/requests/requests.ts b/shared/extra-utils/requests/requests.ts
index 38e24d897..eb59ca600 100644
--- a/shared/extra-utils/requests/requests.ts
+++ b/shared/extra-utils/requests/requests.ts
@@ -182,6 +182,10 @@ function decodeQueryString (path: string) {
182 return decode(path.split('?')[1]) 182 return decode(path.split('?')[1])
183} 183}
184 184
185function unwrap <T> (test: request.Test): Promise<T> {
186 return test.then(res => res.body)
187}
188
185// --------------------------------------------------------------------------- 189// ---------------------------------------------------------------------------
186 190
187export { 191export {
@@ -194,5 +198,6 @@ export {
194 makePutBodyRequest, 198 makePutBodyRequest,
195 makeDeleteRequest, 199 makeDeleteRequest,
196 makeRawRequest, 200 makeRawRequest,
201 unwrap,
197 updateImageRequest 202 updateImageRequest
198} 203}