Skip to content

Commit

Permalink
Rotate release notes as part of the 0.6.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ponylang-main committed Jan 21, 2024
1 parent e6933c7 commit c1936e9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
35 changes: 35 additions & 0 deletions .release-notes/0.6.0.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)
```

35 changes: 0 additions & 35 deletions .release-notes/next-release.md
Original file line number Diff line number Diff line change
@@ -1,35 +0,0 @@
## 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 c1936e9

Please sign in to comment.