protocol-http 0.15.0 → 0.15.1
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
- data/lib/protocol/http/request.rb +4 -12
- data/lib/protocol/http/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 265e26f96b8e609fc948bc318a8179342c709d45e67190d14ea1e911794bac32
|
4
|
+
data.tar.gz: 5635c1b6fa13d10ca34cbe55175489bd289330e6483f50f743813d686d271593
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 062fc717d123926079da6260ab4fd6c55aebde335e66bbe2d4a600a2b131821533b1e0f9ef4d48f066fb902a114ae0914ff97d195c34fa5fde0939308309cb52
|
7
|
+
data.tar.gz: a711f3d315dfb3018ef298a1dd584dd2afc17c03b68edcb9ff3e995047f0b81450fffde999b0619a86dac82be1fc785d0b1695e6560bc7010d948eae13d1a682
|
@@ -28,11 +28,11 @@ module Protocol
|
|
28
28
|
class Request
|
29
29
|
prepend Body::Reader
|
30
30
|
|
31
|
-
def initialize(scheme = nil, authority = nil, method = nil,
|
31
|
+
def initialize(scheme = nil, authority = nil, method = nil, path = nil, version = nil, headers = [], body = nil, protocol = nil)
|
32
32
|
@scheme = scheme
|
33
33
|
@authority = authority
|
34
34
|
@method = method
|
35
|
-
@
|
35
|
+
@path = path
|
36
36
|
@version = version
|
37
37
|
@headers = headers
|
38
38
|
@body = body
|
@@ -42,7 +42,7 @@ module Protocol
|
|
42
42
|
attr_accessor :scheme
|
43
43
|
attr_accessor :authority
|
44
44
|
attr_accessor :method
|
45
|
-
attr_accessor :
|
45
|
+
attr_accessor :path
|
46
46
|
attr_accessor :version
|
47
47
|
attr_accessor :headers
|
48
48
|
attr_accessor :body
|
@@ -53,14 +53,6 @@ module Protocol
|
|
53
53
|
connection.call(self)
|
54
54
|
end
|
55
55
|
|
56
|
-
def path
|
57
|
-
@target
|
58
|
-
end
|
59
|
-
|
60
|
-
def path= value
|
61
|
-
@target = value
|
62
|
-
end
|
63
|
-
|
64
56
|
def head?
|
65
57
|
@method == Methods::HEAD
|
66
58
|
end
|
@@ -80,7 +72,7 @@ module Protocol
|
|
80
72
|
end
|
81
73
|
|
82
74
|
def to_s
|
83
|
-
"#{@scheme}://#{@authority}: #{@method} #{@
|
75
|
+
"#{@scheme}://#{@authority}: #{@method} #{@path} #{@version}"
|
84
76
|
end
|
85
77
|
end
|
86
78
|
end
|