Skip to content

Commit

Permalink
Merge pull request #279 from EasyPost/v5.1.0
Browse files Browse the repository at this point in the history
chore: prepare v5.1.0 for release
  • Loading branch information
Justintime50 authored Jul 28, 2023
2 parents 2c28ca1 + 7529df5 commit c4a59d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# CHANGELOG

## Next Release
## v5.1.0 (2023-07-28)

- Maps 400 status code responses to the new `BadRequestError` class
- Adds hooks to introspect the request and response of API calls (see `HTTP Hooks` section in the README for more details)
- Maps 400 status code responses to the new `BadRequestError` class

## v5.0.1 (2023-06-20)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ my_client = described_class.new(

### HTTP Hooks

Users can audit the HTTP requests and response being made by the library by subscribing to request and response events. To do so, pass a block to `subscribe_request_hook` and `subscribe_response_hook` methods of an instance of `EasyPost::Client`:
Users can audit HTTP requests and responses being made by the library by subscribing to request and response events. To do so, pass a block to the `subscribe_request_hook` and `subscribe_response_hook` methods of an instance of `EasyPost::Client`:

```ruby
require 'easypost'
Expand Down Expand Up @@ -157,7 +157,7 @@ puts response_hook # :my_response_hook

Keep in mind that subscribing a hook with the same name of an existing hook will replace the existing hook with the new one. A request hook and a response hook can share the same name.

#### A note on response hooks and custom HTTP connections
#### Custom HTTP Connections with HTTP Hooks

If you're using a custom HTTP connection, keep in mind that the `response_data` parameter that a response hook receives *will not be hydrated* with all the response data. You will have to inspect the `client_response_object` property in `response_data` to inspect the response code, response headers and response body.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.1
5.1.0

0 comments on commit c4a59d5

Please sign in to comment.