nx-http 0.1.11 → 0.1.12

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: a9eb78e5131e69d6b9a12dfa6ae3b498ac443002acb0cd6265298fbc6abfb2be
4
- data.tar.gz: 76878b79ce34f57bd444c3b15ec9fe3a247e5bc039c91639e77ab3609e8dae40
3
+ metadata.gz: 4d34fb9ce56c9c1a13f0943680d5aba44959aba83097e9e953302cd44beb0750
4
+ data.tar.gz: 99666a5a313f600901ec66a5e3991c007ffa05b99657057cb9f3972576a74ab1
5
5
  SHA512:
6
- metadata.gz: 29f22cc251d0912c5e562fdca3ab3f2dd980dbc70328f3f07109fcd1485eef01053892447aef954b8ebb46b368384ae5265d6f39fd5ba8c48cd0864daf98e386
7
- data.tar.gz: 1c896d33582c00f3b20bb4ca86195de2d54ed2ff60563182a4f5f81ac6b686c1ce18dd2fc0f4e986c3418936d9b5439757c9b0dd0c30686456fb02e60a64370c
6
+ metadata.gz: 1cee6d40872d8d98b69265c9e3c9ccea57d326613ab56c46e5c1aa0fe4fc087a7a6bf13e135820cb1cd787e3bbb9346bfc5b86f64bd9e399e2126c0c20cf4669
7
+ data.tar.gz: a2079134c3921d6a53da01a94ef60d06f179d028ad7cb18ef0d45076be5076535ff000dda197b065af70b6cfa3de86cbc6757b3a4d0b86d97e39c7eb3ddd8fbc
@@ -23,11 +23,6 @@ res = Nx::Http.post("https://pan.baidu.com/api/precreate", {
23
23
  path: "/db.file",
24
24
  autoinit: 1,
25
25
  block_list: '[""]',
26
- }) do |http, request|
27
- request["Content-Type"] = "application/x-www-form-urlencoded"
28
- request["Cookie"] = COOKIE
29
- request["User-Agent"] = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"
30
- # request.body = "path=/db.file&autoinit=1&block_list=%5B%225910a591dd8fc18c32a8f3df4fdc1761%22%5D"
31
- end
26
+ })
32
27
 
33
28
  puts res.body
data/lib/nx/http.rb CHANGED
@@ -47,7 +47,7 @@ module Nx
47
47
  ["get", "post", "put", "delete", "options"].each do |item|
48
48
  define_method item.to_sym do |url, data = {}, options = {}, &block|
49
49
  self.request(item, url, data, options) do |http, request|
50
- block.call(http, request)
50
+ block.call(http, request) if block_given?
51
51
  end
52
52
  end
53
53
  end
data/lib/nx/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Nx
2
2
  class Http
3
- VERSION = "0.1.11"
3
+ VERSION = "0.1.12"
4
4
  end
5
5
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nx-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - afeiship
@@ -69,8 +69,7 @@ files:
69
69
  - lib/nx/data_transform.rb
70
70
  - lib/nx/http.rb
71
71
  - lib/nx/version.rb
72
- - nx-http-0.1.10.gem
73
- - nx-http-0.1.9.gem
72
+ - nx-http-0.1.11.gem
74
73
  - nx-http.gemspec
75
74
  - package.json
76
75
  homepage: https://github.com/afeiship/nx-http
data/nx-http-0.1.10.gem DELETED
Binary file
data/nx-http-0.1.9.gem DELETED
Binary file