Commit Graph

17 Commits

Author SHA1 Message Date
Gabriela Moldovan c3ea366539
tor-dirclient: Remove unused `StringBody` trait. 2023-08-16 16:14:09 +01:00
Gabriela Moldovan cd6c4674dc
tor-dirclient: Make Requestable return requests with String bodies.
It's simpler to always use a `String` to represent directory request bodies.
We no longer need the `StringBody` trait.
2023-08-16 16:14:06 +01:00
Gabriela Moldovan aa3e60b994
tor-dirclient: Deprecate download() instead of removing it. 2023-08-16 16:13:58 +01:00
Gabriela Moldovan 636a18bd7d
tor-dirclient: Add `HsDescUploadRequest`.
The hsdir publisher will send the `HsDescUploadRequest`s to the
appropriate directory using `send_request()`.
2023-08-16 16:13:34 +01:00
Gabriela Moldovan 8ce948bef9
tor-dirclient: Make the body type of a `Requestable` type configurable.
Previously, the `Requestable` trait assumed the body of the request
would always be empty (`http::Request<()>`). This change replaces the
hardcoded `()` body type with the `Requestable::Body` associated type
(which will allow implementors to create requests with non-empty
bodies). This will enable us to reuse the `Requestable` trait for
building `POST` requests for uploading descriptors.
2023-08-16 16:13:30 +01:00
Gabriela Moldovan 9a08f04a76
tor-dirclient: Rename download() to send_request().
`download()` is actually a general-purpose function for sending HTTP
requests on a stream. We will soon repurpose it for `POST`-ing
descriptors, so let's rename it to `send_request`.
2023-08-16 16:13:20 +01:00
Nick Mathewson 27bd990a79 Remove semver.md files for 1.1.6 2023-06-30 10:28:53 -04:00
Nick Mathewson 42e4929226 Missing semver entry for new dirclient API from !1323 2023-06-28 08:06:32 -04:00
Nick Mathewson 38db06ee4b dirclient: Make maximum hsdesc length adjustable. 2023-06-27 16:21:29 -04:00
Nick Mathewson c65b52e552 Remove semver.md files. 2023-05-03 08:33:20 -04:00
Nick Mathewson ba4b43aa8c Add a semver entry for !1112. 2023-04-10 14:38:51 -04:00
Nick Mathewson e0aeda3071 Remove semver.md files now that 1.1.0 is released. 2022-11-30 17:10:29 -05:00
Ian Jackson 7b2a0fbcb1 tor-dirclient: Provide fallible DirResponse::output and into_output 2022-10-20 17:24:53 +01:00
Ian Jackson da3351ad49 tor-dirclient: Make DirResponse be Clone
I want this for testing.  It seems friendly to provide it, though.
2022-10-20 17:24:53 +01:00
Ian Jackson d9375b2b8d tor-dirclient: Make RequestFailed its own error type
We're going to have functions on Response that fail by returning only
one of these.

Sadly this diff is quite noisy.
2022-10-20 17:24:53 +01:00
Nick Mathewson b16c042004 Now that versions have bumped, remove semver.md files. 2022-08-01 10:07:12 -04:00
Nick Mathewson d681967b61 dirclient: Generalize MdSha256Empty to EmptyRequest.
(It makes sense to use this for things that are not in fact lists of
SHA256 digests of Microdescriptors.)
2022-07-07 14:07:04 -04:00