Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: prepare v5.1.0 for release #279

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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