chimera_http_client 1.7.0 → 1.7.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 27502b5b2a10f00e43634863b14ce3d3d7ac3b957a9bcde7f239e0ee73124f55
|
|
4
|
+
data.tar.gz: bd5697952a9e4a24b54e6fffb32ca6aadef39c28404bdfd60f00d0c1dd611f11
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4db5ae181cefef0408b6e2f9586c96f0a311211b7d6b71a9c7ddf3960acb906e7873620b338b8231f42fd3ff999a9c3eeacd98a6f56d2e7345f1704f00bcca93
|
|
7
|
+
data.tar.gz: 515e85c5020b526c6d9d064987355b9c28652ecd9b628d63de176a6dfffbe7fb273a2b7527ae0a9d4aee8128ea5d4cb8f89426f48c4b1d6e778c7d49481b4af5
|
|
@@ -10,11 +10,9 @@ module ChimeraHttpClient
|
|
|
10
10
|
@logger = options[:logger]
|
|
11
11
|
@monitor = options[:monitor]
|
|
12
12
|
@timeout = options[:timeout]
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Typhoeus::Config.user_agent = options.fetch(:user_agent, USER_AGENT)
|
|
17
|
-
Typhoeus::Config.verbose = options.fetch(:verbose, false)
|
|
13
|
+
@cache = options[:cache]
|
|
14
|
+
@user_agent = options.fetch(:user_agent, USER_AGENT)
|
|
15
|
+
@verbose = options.fetch(:verbose, false)
|
|
18
16
|
end
|
|
19
17
|
|
|
20
18
|
private
|
|
@@ -22,6 +20,8 @@ module ChimeraHttpClient
|
|
|
22
20
|
# Add default values to call options
|
|
23
21
|
def augmented_options(options)
|
|
24
22
|
options[:timeout] ||= @timeout
|
|
23
|
+
options[:cache] = @cache if options[:cache].nil?
|
|
24
|
+
options[:verbose] = @verbose if options[:verbose].nil?
|
|
25
25
|
|
|
26
26
|
options
|
|
27
27
|
end
|
|
@@ -41,7 +41,7 @@ module ChimeraHttpClient
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
def default_headers
|
|
44
|
-
{ "Content-Type" => "application/json" }
|
|
44
|
+
{ "Content-Type" => "application/json", "User-Agent" => @user_agent }
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def default_deserializer
|
|
@@ -25,6 +25,7 @@ module ChimeraHttpClient
|
|
|
25
25
|
timeout: options[:timeout] || TIMEOUT_SECONDS,
|
|
26
26
|
accept_encoding: "gzip",
|
|
27
27
|
cache: options[:cache],
|
|
28
|
+
verbose: options[:verbose],
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
# Basic-auth support:
|
|
@@ -52,7 +53,7 @@ module ChimeraHttpClient
|
|
|
52
53
|
url: url,
|
|
53
54
|
code: response.code,
|
|
54
55
|
runtime: runtime,
|
|
55
|
-
user_agent:
|
|
56
|
+
user_agent: headers["User-Agent"],
|
|
56
57
|
}
|
|
57
58
|
)
|
|
58
59
|
|
|
@@ -66,7 +67,7 @@ module ChimeraHttpClient
|
|
|
66
67
|
url: url,
|
|
67
68
|
code: nil,
|
|
68
69
|
runtime: 0,
|
|
69
|
-
user_agent:
|
|
70
|
+
user_agent: headers["User-Agent"],
|
|
70
71
|
}
|
|
71
72
|
)
|
|
72
73
|
|
data/lib/chimera_http_client.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chimera_http_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andreas Finger
|
|
@@ -312,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
312
312
|
- !ruby/object:Gem::Version
|
|
313
313
|
version: '0'
|
|
314
314
|
requirements: []
|
|
315
|
-
rubygems_version: 3.6.
|
|
315
|
+
rubygems_version: 3.6.9
|
|
316
316
|
specification_version: 4
|
|
317
317
|
summary: General http client functionality to quickly connect to JSON REST API endpoints
|
|
318
318
|
and any others
|