Wanted to send a friend a little message.

> Open up @agregore
> Open the Docs for bt-fetch github.com/RangerMauve/bt-fetc
> Open a new window (Ctrl+N)
> For get how the hell to make a torrent
> Open the unit tests to see an example: github.com/RangerMauve/bt-fetc
> Open Devtoosl (ctrl+shift+i)
> It's a post Request

```
r = await fetch('bittorrent://localhost', {
method: 'post',
})
```

(cont)

Follow

> Body is a `FormData`
```
f = new FormData()
f.append('file', new Blob(["<h1>Hello There! :)</h1>"]), 'index.html')
```
> Add it to the request
> OH FUCK I broke the torrent thing and didn't have tests (guess I'll have to try again another day :P)

· · Web · 0 · 0 · 2
Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.