2023-10-04 13:13:25 +00:00
|
|
|
import { doRequest } from '@peertube/peertube-server/core/helpers/requests.js'
|
2018-10-23 09:38:48 +00:00
|
|
|
|
2021-11-02 18:11:20 +00:00
|
|
|
export function makePOSTAPRequest (url: string, body: any, httpSignature: any, headers: any) {
|
2018-10-23 09:38:48 +00:00
|
|
|
const options = {
|
2021-03-08 13:24:11 +00:00
|
|
|
method: 'POST' as 'POST',
|
2018-10-23 09:38:48 +00:00
|
|
|
json: body,
|
|
|
|
httpSignature,
|
|
|
|
headers
|
|
|
|
}
|
|
|
|
|
2021-03-08 13:24:11 +00:00
|
|
|
return doRequest(url, options)
|
2018-10-23 09:38:48 +00:00
|
|
|
}
|