1
0
Fork 0
peertube/shared/extra-utils/server/activitypub.ts

16 lines
491 B
TypeScript
Raw Normal View History

2017-11-30 07:15:25 -05:00
import * as request from 'supertest'
import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
2017-11-30 07:15:25 -05:00
function makeActivityPubGetRequest (url: string, path: string, expectedStatus = HttpStatusCode.OK_200) {
2017-11-30 07:15:25 -05:00
return request(url)
.get(path)
.set('Accept', 'application/activity+json,text/html;q=0.9,\\*/\\*;q=0.8')
2018-11-30 09:06:06 -05:00
.expect(expectedStatus)
2017-11-30 07:15:25 -05:00
}
// ---------------------------------------------------------------------------
export {
makeActivityPubGetRequest
}