Skip to content

Commit

Permalink
Updates release notes for PR #106
Browse files Browse the repository at this point in the history
  • Loading branch information
ponylang-main committed Jan 21, 2024
1 parent 1e9b608 commit 77513e9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 34 deletions.
34 changes: 0 additions & 34 deletions .release-notes/106.md

This file was deleted.

35 changes: 35 additions & 0 deletions .release-notes/next-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Change HTTPClient handler factory creation

The handler factory for creating handlers for new requests is now provided in the constructor of the client instead of the apply method. This makes it more clear, that the client will use the same handler for all requests.

The old version would look similar to this:

```pony
let client = HTTPClient(auth)
// Later
let handler_factory = ...
client(payload, handler_factory)?
// Even later
client(other_payload, other_factory)
```

In the new version the handler factory needs to be supplied at the creation of the client:

```pony
let handler_factory = ...
let client = HTTPClient(auth, handler_factory)
client(payload)
// This will use the handler_factory
client(other_payload)
// To use a different handler factory, create a new client
let other_client = Client(auth, other_factory)
other_client(other_payload)
```

0 comments on commit 77513e9

Please sign in to comment.