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.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/shared/extra-utils/requests/requests.ts b/shared/extra-utils/requests/requests.ts
index 5bbf7f3bf..501e0b374 100644
--- a/shared/extra-utils/requests/requests.ts
+++ b/shared/extra-utils/requests/requests.ts
@@ -57,9 +57,15 @@ function makeActivityPubGetRequest (url: string, path: string, expectedStatus =
57 }) 57 })
58} 58}
59 59
60function makeDeleteRequest (options: CommonRequestParams) { 60function makeDeleteRequest (options: CommonRequestParams & {
61 query?: any
62 rawQuery?: string
63}) {
61 const req = request(options.url).delete(options.path) 64 const req = request(options.url).delete(options.path)
62 65
66 if (options.query) req.query(options.query)
67 if (options.rawQuery) req.query(options.rawQuery)
68
63 return buildRequest(req, { accept: 'application/json', expectedStatus: HttpStatusCode.BAD_REQUEST_400, ...options }) 69 return buildRequest(req, { accept: 'application/json', expectedStatus: HttpStatusCode.BAD_REQUEST_400, ...options })
64} 70}
65 71