Skip to content

Commit

Permalink
Update releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 31, 2024
1 parent 4f5f15d commit de48b5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Please see the [project documentation](https://socketry.github.io/protocol-http/

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

### Unreleased
### v0.30.0

- [`Request[]` and `Response[]` Keyword Arguments](https://socketry.github.io/protocol-http/releases/index#request[]-and-response[]-keyword-arguments)
- [Interim Response Handling](https://socketry.github.io/protocol-http/releases/index#interim-response-handling)
Expand Down
8 changes: 4 additions & 4 deletions releases.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Releases

## Unreleased
## v0.30.0

### `Request[]` and `Response[]` Keyword Arguments

The `Request[]` and `Response[]` methods now support keyword arguments as a convenient way to set various positional arguments.

```ruby
``` ruby
# Request keyword arguments:
client.get("/", headers: {"accept" => "text/html"}, authority: "example.com")

Expand All @@ -21,14 +21,14 @@ The `Request` class now exposes a `#interim_response` attribute which can be use

On the client side, you can pass a callback using the `interim_response` keyword argument which will be invoked whenever an interim response is received:

```ruby
``` ruby
client = ...
response = client.get("/index", interim_response: proc{|status, headers| ...})
```

On the server side, you can send an interim response using the `#send_interim_response` method:

```ruby
``` ruby
def call(request)
if request.headers["expect"] == "100-continue"
# Send an interim response:
Expand Down

0 comments on commit de48b5e

Please sign in to comment.