This major release of Surf contains substantial improvements through a variety of changes and additions.
(Note: this is a cumulative list of changes since Surf 1.0.3)
Notable mentions include:
Uses stable standard library [futures][]!
Much more type compatibility with [Tide][] via [http-types][]!
Re-usable Client which is able to make use of connection pooling under the hood.
Reduced generics for Client and Middleware.
Re-worked Middleware to use [async_trait][].
Major Changes
Surf 2 contains some large API changes, as noted here:
http-types
Surf has switched the common backing type interface (surf::http) from the [http][] (hyperium/http) crate to [http-types][], which covers a larger set of HTTP-related functionality than hyperium/http does, and allows Surf to use the [url standard][].
This affects any type that came from surf::http, such as StatusCode ([old][StatusCode http]|[new][StatusCode http-types]), and includes some new patterns, such as [Body][].
surf::Exception, which was a plain Box<dyn Error + Send + Sync + 'static>, is no more.
Surf now exports a structured [surf::Error][] type, which holds a StatusCode alongside a dynamic error object.
Just like [anyhow][], any error can be cast to this type using the ? operator.
This major release of Surf contains substantial improvements through a variety of changes and additions.
(Note: this is a cumulative list of changes since Surf 1.0.3)
Notable mentions include:
Uses stable standard library [futures][]!
Much more type compatibility with [Tide][] via [http-types][]!
Re-usable Client which is able to make use of connection pooling under the hood.
Reduced generics for Client and Middleware.
Re-worked Middleware to use [async_trait][].
Major Changes
Surf 2 contains some large API changes, as noted here:
http-types
Surf has switched the common backing type interface (surf::http) from the [http][] (hyperium/http) crate to [http-types][], which covers a larger set of HTTP-related functionality than hyperium/http does, and allows Surf to use the [url standard][].
This affects any type that came from surf::http, such as StatusCode ([old][StatusCode http]|[new][StatusCode http-types]), and includes some new patterns, such as [Body][].
surf::Exception, which was a plain Box<dyn Error + Send + Sync + 'static>, is no more.
Surf now exports a structured [surf::Error][] type, which holds a StatusCode alongside a dynamic error object.
Just like [anyhow][], any error can be cast to this type using the ? operator.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps surf from 2.0.0-alpha.7 to 2.1.0.
Release notes
Sourced from surf's releases.
... (truncated)
Changelog
Sourced from surf's changelog.
... (truncated)
Commits
8f00394
2.1.055c5d6a
Merge pull request #234 from Fishrock123/hyper-client14ce915
Merge pull request #252 from CrockAgile/fix/base-urlb856efd
Merge pull request #250 from Fishrock123/middleware-client-base_urle499e51
Client: propagate base_url in middleware stack9313eb6
Fix client base_url documentation1647770
crate: add hyper-client featureeb6eaf9
2.0.0c1feba5
meta: changelog for alpha.73e6ab70
Merge pull request #249 from jbr/no-url-direct-depDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)