Skip to content

Releases: neonmoe/minreq

2.1.1

30 Apr 22:30
Compare
Choose a tag to compare

Fixed

  • Handling of status codes 204 and 304. Thanks to @Mubelotix!

2.1.0

14 Mar 17:24
Compare
Choose a tag to compare

Added

  • Proxy support via the proxy feature. Thanks to @rustysec!

2.0.3

15 Jan 16:56
8cece13
Compare
Choose a tag to compare

Accidentally broke header parsing in 2.0.2 for pretty much all cases that weren't broken before that. Didn't notice the regression before releasing because I was running cargo test without --all-features. This version fixes that.

Fixed

  • Fixed regression in header parsing caused by 2.0.2, which was yanked.

2.0.2

15 Jan 16:36
e7a1c72
Compare
Choose a tag to compare

Some panics slipped by the unwrap-purification process, here's two of them fixed (reported in issues #23 and #24).

Fixed

  • Fixed a panic when sending a request to an invalid domain via https.
  • Fixed a panic when parsing headers that have >1 byte unicode characters right after the ":" in the response.

2.0.1

11 Jan 12:52
f0db696
Compare
Choose a tag to compare

Fixed issue #22.

Fixed

  • Made timeouts work as described in the documentation.

2.0.0

11 Jan 12:49
Compare
Choose a tag to compare

The big API-breaking update.

Added

  • API for loading the HTTP response body through an iterator, allowing for processing of the data during the download.
    • See the ResponseLazy documentation for more information.
  • Error type for all the errors that this crate can run into for easier ? usage and better debuggability.
  • Punycode support for non-ascii hostnames via the punycode feature.
  • Trailer header support.
  • Examples hello, iterator, and json.

Changed

  • Breaking, will cause problems not detectable by the compiler: Response headers' field names are now in lowercase, as they are case-insensitive and this makes getting header values easier. The values are unaffected. So if your code has response.headers.get("Content-Type"), you have to change it to response.headers.get("content-type"), or it will not return what you want.
  • Breaking: Restructure the Response struct:
    • Removed bytes and body_bytes.
    • Added as_bytes(), into_bytes(), and as_str() in their place.
  • Breaking: Changed the with_body parameter type to Into<Vec<u8>> from Into<String>.
    • Strings implement Into<Vec<u8>>, so this shouldn't cause any problems, unless you're using some interesting types that implement Into<String> but not Into<Vec<u8>>.
  • Clean up the crate internals overall. Note: This might cause instability, if you're very concerned about stability, please hold off upgrading for a while.
  • Remove panic! when trying to make an https:// request without the https feature. The request will now return an error instead. The library should not panic anymore.
  • Audit the remaining unwrap()s from library code, none of them should actually ever cause a panic now.

Removed

  • create_request in favor of just using Response::new.

1.4.0

13 Jul 09:08
Compare
Choose a tag to compare

This release provides json support in the form of a new feature that provides the capabilities to send and parse responses as json, via serde. Thanks to @jonas-l for the whole feature!

Changelog

  • Add json-using-serde feature, PR #15.

1.3.0

04 Jun 17:39
Compare
Choose a tag to compare

Switched to handling HTTP responses as byte vecs instead of strings, so now you can download images and other non-UTF-8 content.

Changelog

  • Fixed some clippy warnings.
  • Added the body_bytes field to Response, which contains the body in raw bytes.
  • Made it so that minreq doesn't panic when getting a non-UTF-8 response, and instead, setting body to just an empty string. The aforementioned body_bytes will still contain the actual body.

1.2.1

24 May 13:52
Compare
Choose a tag to compare

Previously, the http response was split into lines, and then the body was manually reconstructed from the lines, with \r\n between. This obviously doesn't preserve the original body very well. This is now fixed, and the body should be exactly as the sender wrote it. Thanks @shanavas786 for the code review!

Changelog

  • Fix http response body handling.

1.2.0

23 May 17:17
Compare
Choose a tag to compare

Added redirection support. Covering more and more of the http standard by the month! In addition, this release includes memory optimizations by @gnuvince, thanks for the contribution!

Changelog

  • Support for the HTTP status codes 301, 302, 303 and 307.
  • Less .clone()s. PR #10