aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/requests
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/requests')
-rw-r--r--shared/extra-utils/requests/requests.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/shared/extra-utils/requests/requests.ts b/shared/extra-utils/requests/requests.ts
index 60a08b13c..5bbf7f3bf 100644
--- a/shared/extra-utils/requests/requests.ts
+++ b/shared/extra-utils/requests/requests.ts
@@ -29,9 +29,12 @@ function makeRawRequest (url: string, expectedStatus?: HttpStatusCode, range?: s
29 29
30function makeGetRequest (options: CommonRequestParams & { 30function makeGetRequest (options: CommonRequestParams & {
31 query?: any 31 query?: any
32 rawQuery?: string
32}) { 33}) {
33 const req = request(options.url).get(options.path) 34 const req = request(options.url).get(options.path)
34 .query(options.query) 35
36 if (options.query) req.query(options.query)
37 if (options.rawQuery) req.query(options.rawQuery)
35 38
36 return buildRequest(req, { contentType: 'application/json', expectedStatus: HttpStatusCode.BAD_REQUEST_400, ...options }) 39 return buildRequest(req, { contentType: 'application/json', expectedStatus: HttpStatusCode.BAD_REQUEST_400, ...options })
37} 40}