protocol-http 0.26.2 → 0.26.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/protocol/http/body/readable.rb +10 -0
- data/lib/protocol/http/body/wrapper.rb +7 -0
- data/lib/protocol/http/headers.rb +2 -0
- data/lib/protocol/http/request.rb +13 -0
- data/lib/protocol/http/response.rb +10 -0
- data/lib/protocol/http/version.rb +1 -1
- 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: cd49532afd66aa61fc45281ce3fd9493e241790cd3daaf59c071793f91b5b42a
|
4
|
+
data.tar.gz: a8b0cefa5ad518293558a66a2db77fb4bd9ef3ba381134d9051d24ad1bcb64a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d243e058e7cd0dd9825c44de883e5badf0df4aa150608ffdc034e4c0259412d64699cb97e0132e2d9307bcf874a2ce67f03e02046d00c761415d71c5c0a7941
|
7
|
+
data.tar.gz: 0d29c9fd133dede2b2d7a545405df8e64dcfb497477c1252bb34e41fffac7fc9540142b9d1961a146d2e4afcedc86fb4cb9ce2e75d55a5c1a5e4ac4c0ced8659
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -73,6 +73,19 @@ module Protocol
|
|
73
73
|
@method != Methods::POST && (@body.nil? || @body.empty?)
|
74
74
|
end
|
75
75
|
|
76
|
+
def as_json
|
77
|
+
{
|
78
|
+
scheme: @scheme,
|
79
|
+
authority: @authority,
|
80
|
+
method: @method,
|
81
|
+
path: @path,
|
82
|
+
version: @version,
|
83
|
+
headers: @headers&.as_json,
|
84
|
+
body: @body&.as_json,
|
85
|
+
protocol: @protocol
|
86
|
+
}
|
87
|
+
end
|
88
|
+
|
76
89
|
def to_s
|
77
90
|
"#{@scheme}://#{@authority}: #{@method} #{@path} #{@version}"
|
78
91
|
end
|
@@ -104,6 +104,16 @@ module Protocol
|
|
104
104
|
Response[500, Headers['content-type' => 'text/plain'], ["#{exception.class}: #{exception.message}"]]
|
105
105
|
end
|
106
106
|
|
107
|
+
def as_json
|
108
|
+
{
|
109
|
+
version: @version,
|
110
|
+
status: @status,
|
111
|
+
headers: @headers&.as_json,
|
112
|
+
body: @body&.as_json,
|
113
|
+
protocol: @protocol
|
114
|
+
}
|
115
|
+
end
|
116
|
+
|
107
117
|
def to_s
|
108
118
|
"#{@status} #{@version}"
|
109
119
|
end
|
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.26.
|
4
|
+
version: 0.26.3
|
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-04-
|
50
|
+
date: 2024-04-16 00:00:00.000000000 Z
|
51
51
|
dependencies: []
|
52
52
|
description:
|
53
53
|
email:
|
metadata.gz.sig
CHANGED
Binary file
|