Skip to content

Commit

Permalink
Update releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 22, 2024
1 parent 7a6f689 commit 80097b5
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 5 deletions.
48 changes: 44 additions & 4 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
# v0.18.0
# Changes

## Config Block
## v0.19.0

### Support `in_parallel`

The adapter now supports the `in_parallel` method, which allows multiple requests to be made concurrently.

```ruby
adapter = Faraday.new(bound_url) do |builder|
builder.adapter :async_http
end

response1 = response2 = response3 = nil

adapter.in_parallel do
response1 = adapter.get("/index")
response2 = adapter.get("/index")
response3 = adapter.get("/index")
end

puts response1.body # => "Hello World"
puts response2.body # => "Hello World"
puts response3.body # => "Hello World"
```

This is primarily for compatibility with existing code. If you are designing a new library, you should just use `Async` directly:

```ruby
Async do
response1 = Async{adapter.get("/index")}
response2 = Async{adapter.get("/index")}
response3 = Async{adapter.get("/index")}

puts response1.wait.body # => "Hello World"
puts response2.wait.body # => "Hello World"
puts response3.wait.body # => "Hello World"
end
```

## v0.18.0

### Config Block

The `config_block` provided to the adapter must now return `nil`, `client` or a middleware wrapper around `client`.

Expand All @@ -16,9 +56,9 @@ Faraday.new do |builder|
end
```

# v0.17.0
## v0.17.0

## Per-thread Client Cache
### Per-thread Client Cache

The default adapter now uses a per-thread client cache internally, to improve compatibility with existing code that shares a single `Faraday::Connection` instance across multiple threads.

Expand Down
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ Please see the [project documentation](https://socketry.github.io/async-http-far

## Releases

Please see the [project changes](https://socketry.github.io/async-http-faraday//changes/index) for all releases.
Please see the [project changes](https://socketry.github.io/async-http-faraday/changes/index) for all releases.

### v0.19.0

- [Support `in_parallel`](https://socketry.github.io/async-http-faraday/changes/index#support-in_parallel)

### v0.18.0

Expand Down

0 comments on commit 80097b5

Please sign in to comment.