mint_http 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c08be62d1af8320bd49abdf109cfff5e1d4d5a3c96e74630eb4deb34175182b4
4
- data.tar.gz: bca05dbe5f21f4874332df34da20f82e8b71a9759c5b6cdebd10d48cd5c03eac
3
+ metadata.gz: 46b42d69a0808174a85b666205e87a4a1e5f41f04fe4fe12480bca4005854a22
4
+ data.tar.gz: e19d90fa0448fbe1ca203290f5249d6bef7c12c6349ed7a87f43e1e8b7574b12
5
5
  SHA512:
6
- metadata.gz: c48738df260bdbfaad27c28d58c68a964b62983542fe3427815c461c79556ff72627c044df97716ad2bd8c398e6edbbebd54effdf0d3e7915756b99bfad159c6
7
- data.tar.gz: 29594f85b3f2d21db42b4dc24a3397223d2dbccf7d7637a5b6cca55b6e67c8489428e8fca9049ccc0cfe15c04e7fa3ba06a3f96e92505b98c5e30429f5c980bb
6
+ metadata.gz: 5dddd2fabc76d97c1d68e284ac56174d913b824ab5135ed847d8757f3a296d29ee6bb0ee7a3573c1c76a2cece53bc34f0b541b96ed15e9e54d49057dd4bf17d4
7
+ data.tar.gz: 48394dfd7e4a43c20d3698c291862559171fa4e50d670bc2092f2e811813b3a43bebb1d979baadcbbb55110bc23480af0274109c33b5824e5676c42629b6a92c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mint_http (0.1.1)
4
+ mint_http (0.1.4)
5
5
  base64
6
6
  json
7
7
  net-http
@@ -49,6 +49,8 @@ module MintHttp
49
49
 
50
50
  @pool = pool
51
51
  header('Connection' => 'keep-alive')
52
+
53
+ self
52
54
  end
53
55
 
54
56
  def timeout(open, write, read)
@@ -151,7 +153,11 @@ module MintHttp
151
153
  def with_body(raw)
152
154
  @body_type = :raw
153
155
  @body = raw
154
- content_type(nil)
156
+
157
+ unless @headers['Content-Type']
158
+ content_type('application/octet-stream')
159
+ end
160
+
155
161
  self
156
162
  end
157
163
 
@@ -232,7 +238,9 @@ module MintHttp
232
238
  raise ArgumentError, "Only HTTP and HTTPS URLs are allowed"
233
239
  end
234
240
 
235
- url.query = URI.encode_www_form(@query)
241
+ unless (encoded_query = URI.encode_www_form(@query)).empty?
242
+ url.query = encoded_query
243
+ end
236
244
 
237
245
  net_request = case method.to_s
238
246
  when 'get'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MintHttp
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
5
5
  end
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.3
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-09 00:00:00.000000000 Z
11
+ date: 2023-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-http