diff options
Diffstat (limited to 'packages/tests/src/shared/requests.ts')
-rw-r--r-- | packages/tests/src/shared/requests.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/tests/src/shared/requests.ts b/packages/tests/src/shared/requests.ts new file mode 100644 index 000000000..fc70ad6ed --- /dev/null +++ b/packages/tests/src/shared/requests.ts | |||
@@ -0,0 +1,12 @@ | |||
1 | import { doRequest } from '@peertube/peertube-server/server/helpers/requests.js' | ||
2 | |||
3 | export function makePOSTAPRequest (url: string, body: any, httpSignature: any, headers: any) { | ||
4 | const options = { | ||
5 | method: 'POST' as 'POST', | ||
6 | json: body, | ||
7 | httpSignature, | ||
8 | headers | ||
9 | } | ||
10 | |||
11 | return doRequest(url, options) | ||
12 | } | ||