aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/activitypub.ts
blob: cf967ed7d0c639b47abf4f95a8e81639c6a28cba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import * as request from 'supertest'
import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'

function makeActivityPubGetRequest (url: string, path: string, expectedStatus = HttpStatusCode.OK_200) {
  return request(url)
    .get(path)
    .set('Accept', 'application/activity+json,text/html;q=0.9,\\*/\\*;q=0.8')
    .expect(expectedStatus)
}

// ---------------------------------------------------------------------------

export {
  makeActivityPubGetRequest
}