Skip to content
This repository has been archived by the owner on Nov 18, 2019. It is now read-only.

Commit

Permalink
Prepare v0.3.1 for release
Browse files Browse the repository at this point in the history
  • Loading branch information
randomPoison committed Aug 23, 2017
1 parent 8176201 commit c015c95
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## Courier v0.3.1 (2017-08-23)

Quick update to the v0.3 release fixing some issues with the initial version.

### Fixes

* Fixed the generated [`Responder`] impl to actually generate MessagePack responses when the
`msgpack` feature is enabled, and to not generate JSON responses when the `json` feature is
disabled. ([#1](https://github.com/excaliburHisSheath/courier/pull/1))
* Fixed the generated [`Responder`] impl to check the [`Accept`] header to determine what format
to use for the response body. ([#1](https://github.com/excaliburHisSheath/courier/pull/1))

## Courier v0.3 (2017-08-22)

Initial release supporting v0.3.x of Rocket. Provides support for deriving [`FromData`] and
Expand All @@ -13,3 +25,4 @@ respectively. Also supports using both [JSON] and [MessagePack] formats for data
[MessagePack]: http://msgpack.org/index.html
[`serde::Deserialize`]: https://docs.rs/serde/1/serde/trait.Deserialize.html
[`serde::Serialize`]: https://docs.rs/serde/1/serde/trait.Serialize.html
[`Accept`]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "courier"
version = "0.3.0"
version = "0.3.1"
authors = ["David LeGare <[email protected]>"]
description = "Utility to make it easier to send and receive data when using the Rocket framework."
documentation = "https://docs.rs/courier"
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Add `courier`, as well as the relevant Serde crates to your `Cargo.toml`:

```toml
[dependencies]
courier = "0.3"
courier = "0.3.1"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
Expand Down Expand Up @@ -92,7 +92,7 @@ serde_derive = "1.0"
serde_json = "1.0"

[dependencies.courier]
version = "0.3"
version = "0.3.1"
features = ["msgpack"]
```

Expand All @@ -114,17 +114,16 @@ not wish to support JSON, you can specify `default-features = false` in your `Ca

```toml
[dependencies.courier]
version = "0.3"
version = "0.3.1"
default-features = false
features = ["msgpack"]
```

## Using Multiple Formats

When multiple formats are enabled at once, the [`Content-Type`] header in the request is used to
determine which format to use. A response will use the same content type specified in the request,
so a request sent with JSON will receive a response with JSON, a request sent with MessagePack
will get a response with MessagePack, and so on.
determine which format the request data is in, and the [`Accept`] header is used to determine which
format to use for the response.

While this mostly removes the need for [`rocket_contrib::Json`] (and similar types), it is still
possible to use it to override the behavior defined with `courier`. For example, say you
Expand Down Expand Up @@ -168,4 +167,5 @@ Note, though, that recommended to not explicitly specify the `format` parameter
[`serde_json`]: https://crates.io/crates/serde_json
[`rmp-serde`]: https://crates.io/crates/rmp-serde
[`Content-Type`]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type
[`Accept`]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept
[`rocket_contrib::Json`]: https://api.rocket.rs/rocket_contrib/struct.Json.html
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//!
//! ```toml
//! [dependencies]
//! courier = "0.3"
//! courier = "0.3.1"
//! serde = "1.0"
//! serde_derive = "1.0"
//! serde_json = "1.0"
Expand Down Expand Up @@ -76,7 +76,7 @@
//! serde_json = "1.0"
//!
//! [dependencies.courier]
//! version = "0.3"
//! version = "0.3.1"
//! features = ["msgpack"]
//! ```
//!
Expand All @@ -99,17 +99,16 @@
//!
//! ```toml
//! [dependencies.courier]
//! version = "0.3"
//! version = "0.3.1"
//! default-features = false
//! features = ["msgpack"]
//! ```
//!
//! ## Using Multiple Formats
//!
//! When multiple formats are enabled at once, the [`Content-Type`] header in the request is used to
//! determine which format to use. A response will use the same content type specified in the request,
//! so a request sent with JSON will receive a response with JSON, a request sent with MessagePack
//! will get a response with MessagePack, and so on.
//! determine which format the request data is in, and the [`Accept`] header is used to determine which
//! format to use for the response.
//!
//! While this mostly removes the need for [`rocket_contrib::Json`] (and similar types), it is still
//! possible to use it to override the behavior defined with `courier`. For example, say you
Expand Down Expand Up @@ -186,6 +185,7 @@
//! [`serde_json`]: https://crates.io/crates/serde_json
//! [`rmp-serde`]: https://crates.io/crates/rmp-serde
//! [`Content-Type`]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type
//! [`Accept`]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept
//! [`rocket_contrib::Json`]: https://api.rocket.rs/rocket_contrib/struct.Json.html

#![recursion_limit="128"]
Expand Down

0 comments on commit c015c95

Please sign in to comment.