mint_http 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e41023f0785155bb3968545f7a1e86698c83731c30f300d4da82b468cf64bdd0
4
- data.tar.gz: b4dd6b49a7567e6e7b62be3129b21f6a35d0b74d4ec923957f7a3240cfb2f0c7
3
+ metadata.gz: 46b42d69a0808174a85b666205e87a4a1e5f41f04fe4fe12480bca4005854a22
4
+ data.tar.gz: e19d90fa0448fbe1ca203290f5249d6bef7c12c6349ed7a87f43e1e8b7574b12
5
5
  SHA512:
6
- metadata.gz: 5bbd585918f7be38d2d837843030a0a287382d2c0adfa7740c40b115504bb1c5cf7b9aed438faf72b462687ca4c6d52878bdd63e4c2f67eb79da739d39943407
7
- data.tar.gz: 314f206f55fcfaab3cfe8aa352c79530e4509f627dff853561a2aed8165dcb8fcc6fc4cfb9ed83e24299d37d7281ac3cfd4b32165af3431a5787413cb111e8a0
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.3)
4
+ mint_http (0.1.4)
5
5
  base64
6
6
  json
7
7
  net-http
@@ -153,7 +153,10 @@ module MintHttp
153
153
  def with_body(raw)
154
154
  @body_type = :raw
155
155
  @body = raw
156
- content_type(nil)
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
- url.query = URI.encode_www_form(@query)
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'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MintHttp
4
- VERSION = "0.1.4"
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.4
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-27 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