summaryrefslogtreecommitdiffstats
path: root/contrib/bruno/users/follow.bru
blob: 89cf4e17bde7c089d9f2b6862fba8062954426e4 (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
26
27
28
29
meta {
  name: follow
  type: http
  seq: 3
}

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

headers {
  Content-Type: application/activity+json
}

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`
  })
}