protocol-http 0.30.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/protocol/http/body/readable.rb +5 -0
- data/lib/protocol/http/methods.rb +2 -2
- data/lib/protocol/http/version.rb +1 -1
- data/readme.md +5 -1
- data/releases.md +8 -4
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 924ae96ed9d907e15583c52df242c08481c7740a677e6c3a594f9d76ce2aad6e
|
4
|
+
data.tar.gz: b7f82710d54ba3e2bb2ffb974a2e46d82c734f53d909ea391986bfde260ea16d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ea73874b0712492e11a18d8b4d3339cf70604cf60c3b2da62d3cbd437a5af083dacee44dc222be71373abd726051ecf8cd6a063914cb96ad42ef54f35446ed5
|
7
|
+
data.tar.gz: 10f2982481609e45edd91c5b9a71bc7cac26957849151455359eb0ba9e55cff79688564f39b4611ea57de622296b1474e8c2d5190c7bbb1a9ea1a559366f6fa0
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -69,10 +69,10 @@ module Protocol
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
self.each do |name,
|
72
|
+
self.each do |name, method|
|
73
73
|
define_method(name) do |location, *arguments, **options|
|
74
74
|
self.call(
|
75
|
-
Request[
|
75
|
+
Request[method, location.to_s, *arguments, **options]
|
76
76
|
)
|
77
77
|
end
|
78
78
|
end
|
data/readme.md
CHANGED
@@ -22,7 +22,11 @@ Please see the [project documentation](https://socketry.github.io/protocol-http/
|
|
22
22
|
|
23
23
|
Please see the [project releases](https://socketry.github.io/protocol-http/releases/index) for all releases.
|
24
24
|
|
25
|
-
###
|
25
|
+
### v0.31.0
|
26
|
+
|
27
|
+
- Ensure chunks are flushed if required, when streaming.
|
28
|
+
|
29
|
+
### v0.30.0
|
26
30
|
|
27
31
|
- [`Request[]` and `Response[]` Keyword Arguments](https://socketry.github.io/protocol-http/releases/index#request[]-and-response[]-keyword-arguments)
|
28
32
|
- [Interim Response Handling](https://socketry.github.io/protocol-http/releases/index#interim-response-handling)
|
data/releases.md
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
# Releases
|
2
2
|
|
3
|
-
##
|
3
|
+
## v0.31.0
|
4
|
+
|
5
|
+
- Ensure chunks are flushed if required, when streaming.
|
6
|
+
|
7
|
+
## v0.30.0
|
4
8
|
|
5
9
|
### `Request[]` and `Response[]` Keyword Arguments
|
6
10
|
|
7
11
|
The `Request[]` and `Response[]` methods now support keyword arguments as a convenient way to set various positional arguments.
|
8
12
|
|
9
|
-
```ruby
|
13
|
+
``` ruby
|
10
14
|
# Request keyword arguments:
|
11
15
|
client.get("/", headers: {"accept" => "text/html"}, authority: "example.com")
|
12
16
|
|
@@ -21,14 +25,14 @@ The `Request` class now exposes a `#interim_response` attribute which can be use
|
|
21
25
|
|
22
26
|
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:
|
23
27
|
|
24
|
-
```ruby
|
28
|
+
``` ruby
|
25
29
|
client = ...
|
26
30
|
response = client.get("/index", interim_response: proc{|status, headers| ...})
|
27
31
|
```
|
28
32
|
|
29
33
|
On the server side, you can send an interim response using the `#send_interim_response` method:
|
30
34
|
|
31
|
-
```ruby
|
35
|
+
``` ruby
|
32
36
|
def call(request)
|
33
37
|
if request.headers["expect"] == "100-continue"
|
34
38
|
# Send an interim response:
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.31.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -47,7 +47,7 @@ cert_chain:
|
|
47
47
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
48
48
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
49
49
|
-----END CERTIFICATE-----
|
50
|
-
date: 2024-
|
50
|
+
date: 2024-09-03 00:00:00.000000000 Z
|
51
51
|
dependencies: []
|
52
52
|
description:
|
53
53
|
email:
|
metadata.gz.sig
CHANGED
Binary file
|