mint_http 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/mint_http/request.rb +7 -2
- data/lib/mint_http/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46b42d69a0808174a85b666205e87a4a1e5f41f04fe4fe12480bca4005854a22
|
4
|
+
data.tar.gz: e19d90fa0448fbe1ca203290f5249d6bef7c12c6349ed7a87f43e1e8b7574b12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dddd2fabc76d97c1d68e284ac56174d913b824ab5135ed847d8757f3a296d29ee6bb0ee7a3573c1c76a2cece53bc34f0b541b96ed15e9e54d49057dd4bf17d4
|
7
|
+
data.tar.gz: 48394dfd7e4a43c20d3698c291862559171fa4e50d670bc2092f2e811813b3a43bebb1d979baadcbbb55110bc23480af0274109c33b5824e5676c42629b6a92c
|
data/Gemfile.lock
CHANGED
data/lib/mint_http/request.rb
CHANGED
@@ -153,7 +153,10 @@ module MintHttp
|
|
153
153
|
def with_body(raw)
|
154
154
|
@body_type = :raw
|
155
155
|
@body = raw
|
156
|
-
|
156
|
+
|
157
|
+
unless @headers['Content-Type']
|
158
|
+
content_type('application/octet-stream')
|
159
|
+
end
|
157
160
|
|
158
161
|
self
|
159
162
|
end
|
@@ -235,7 +238,9 @@ module MintHttp
|
|
235
238
|
raise ArgumentError, "Only HTTP and HTTPS URLs are allowed"
|
236
239
|
end
|
237
240
|
|
238
|
-
|
241
|
+
unless (encoded_query = URI.encode_www_form(@query)).empty?
|
242
|
+
url.query = encoded_query
|
243
|
+
end
|
239
244
|
|
240
245
|
net_request = case method.to_s
|
241
246
|
when 'get'
|
data/lib/mint_http/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mint_http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ali Alhoshaiyan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09
|
11
|
+
date: 2023-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-http
|