You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+11-7
Original file line number
Diff line number
Diff line change
@@ -56,13 +56,17 @@ Routes
56
56
57
57
There are several routes to interact with torrents:
58
58
59
-
-`GET /data?ih=<infohash in hex>&path=<display path of file declared in torrent info>&filename=<file name of the data, optional>`. Note that this handler supports HTTP range requests for bytes. Response will block until the data is available.
60
-
-`GET /status`. This fetches the textual status info page per anacrolix/torrent.Client.WriteStatus. Very useful for debugging.
61
-
-`GET /info?ih=<infohash in hex>`. This returns the info bytes for the matching torrent. It's useful if the caller needs to know about the torrent, such as what files it contains. It will block until the info is available. The response is the full bencoded info dictionary per [BEP 3](http://www.bittorrent.org/beps/bep_0003.html).
62
-
-`/events?ih=<infohash in hex>`. This is a websocket that emits frames with [confluence.Event] encoded as JSON for the torrent. The PieceChanged field for instance is set if the given piece changed [state](https://godoc.org/github.com/anacrolix/torrent#PieceState) within the torrent.
63
-
-`GET /fileState?ih=<infohash in hex>&path=<display path of file declared in torrent info>`. Returns [file state](https://godoc.org/github.com/anacrolix/torrent#File.State) encoded as JSON.
64
-
-`POST /metainfo?ih=<infohash in hex>`. The request body is a bencoded metainfo, as typically appears in a `.torrent` file. The trackers and info bytes are applied to the torrent matching the info hash provided in the query. No fields in the metainfo are mandatory.
65
-
-`GET /metainfo?ih=<infohash in hex>`. returns a .torrent file containing the hash info.
59
+
-`GET /data/infohash/<infohash in hex>/<display path of file declared in torrent info>`
60
+
61
+
`GET /data/magnet/<URI-encoded magnet link>/<display path of file declared in torrent info>`
62
+
63
+
`GET /data?ih=<infohash in hex>&path=<display path of file declared in torrent info>&filename=<file name of the data, optional>`. Note that this handler supports HTTP range requests for bytes. Response will block until the data is available.
64
+
-`GET /status`. This fetches the textual status info page per anacrolix/torrent.Client.WriteStatus. Very useful for debugging.
65
+
-`GET /info?ih=<infohash in hex>`. This returns the info bytes for the matching torrent. It's useful if the caller needs to know about the torrent, such as what files it contains. It will block until the info is available. The response is the full bencoded info dictionary per [BEP 3](http://www.bittorrent.org/beps/bep_0003.html).
66
+
-`/events?ih=<infohash in hex>`. This is a websocket that emits frames with [confluence.Event] encoded as JSON for the torrent. The PieceChanged field for instance is set if the given piece changed [state](https://godoc.org/github.com/anacrolix/torrent#PieceState) within the torrent.
67
+
-`GET /fileState?ih=<infohash in hex>&path=<display path of file declared in torrent info>`. Returns [file state](https://godoc.org/github.com/anacrolix/torrent#File.State) encoded as JSON.
68
+
-`POST /metainfo?ih=<infohash in hex>`. The request body is a bencoded metainfo, as typically appears in a `.torrent` file. The trackers and info bytes are applied to the torrent matching the info hash provided in the query. No fields in the metainfo are mandatory.
69
+
-`GET /metainfo?ih=<infohash in hex>`. returns a .torrent file containing the hash info.
66
70
67
71
Wherever a `?ih=<infohash>` query parameter is expected, it can also be substituted by a `?magnet=<magnet URI>` parameter instead.
0 commit comments