json_requester 1.0.9 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/json_requester.rb +3 -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: 61edfdc55b1925b3e1907fe89a32298b4baf64e2f63c7f7781bb3b1599801dce
|
4
|
+
data.tar.gz: 73be7e54ea0e2523f32c500bd2367caf339207173a1e17ab3d8a0bf5230648a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8666c62ffea8ed9a5c5f9b5ff46ffdddd2e11ff972508b6d7c13ceeb2f9101f01d84724baf06b0a89ec4a3d563e6dd7e2e786ed93f306595d4c3a0f41ca968a2
|
7
|
+
data.tar.gz: 001c495f700f71de07002edc11a92a7e9b7c862c2e9edb5c207ea8496c966753258242f514a69de1133eb7af16e2bab73a27ec77958ddc50da18182bb523dc68
|
data/lib/json_requester.rb
CHANGED
@@ -4,10 +4,11 @@ require 'json'
|
|
4
4
|
class JsonRequester
|
5
5
|
attr_reader :host, :conn
|
6
6
|
|
7
|
-
def initialize(host, multipart: false, ssl_verify: true)
|
7
|
+
def initialize(host, multipart: false, ssl_verify: true, timeout: 60)
|
8
8
|
@host = host
|
9
9
|
@multipart = multipart
|
10
10
|
@ssl_verify = ssl_verify
|
11
|
+
@timeout = timeout
|
11
12
|
end
|
12
13
|
|
13
14
|
def http_send(http_method, path, params={}, headers={})
|
@@ -75,6 +76,7 @@ class JsonRequester
|
|
75
76
|
faraday.request :url_encoded # form-encode POST params
|
76
77
|
faraday.response :logger # log requests to $stdout
|
77
78
|
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
|
79
|
+
faraday.options.timeout = @timeout
|
78
80
|
end
|
79
81
|
end
|
80
82
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_requester
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JiaRou Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|