summaryrefslogtreecommitdiffstats
path: root/contrib/bruno/users/follow.bru
blob: 7c84f346ba50bd218836a07a6fe09f187f655a88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
meta {
  name: follow
  type: http
  seq: 3
}

post {
  url: {{HUT_HOSTNAME}}/users/sellershut/inbox
  body: none
  auth: none
}

script:pre-request {
  const { nanoid } = require("nanoid")
  
  const hostname = bru.getEnvVar("HUT_HOSTNAME");
  
  req.setBody({
    "@context": "https://www.w3.org/ns/activitystreams",
    "id": `${hostname}/activity/follow/${nanoid()}`,
    "type": "Follow",
    "actor": `http://localhost/users/sellershut`,
    "object": `http://localhost/users/sellershut`
  })
}