Use got instead of request

This commit is contained in:
Chocobozzz
2021-03-08 14:24:11 +01:00
parent 71926aae07
commit db4b15f21f
32 changed files with 346 additions and 328 deletions

View File

@@ -5,14 +5,13 @@ import { activityPubContextify } from '../../../server/helpers/activitypub'
function makePOSTAPRequest (url: string, body: any, httpSignature: any, headers: any) {
const options = {
method: 'POST',
uri: url,
method: 'POST' as 'POST',
json: body,
httpSignature,
headers
}
return doRequest(options)
return doRequest(url, options)
}
async function makeFollowRequest (to: { url: string }, by: { url: string, privateKey }) {

View File

@@ -59,7 +59,7 @@ export type ActivitypubHttpFetcherPayload = {
export type ActivitypubHttpUnicastPayload = {
uri: string
signatureActorId?: number
body: any
body: object
contextType?: ContextType
}