wolf_core 1.0.59 → 1.0.60
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wolf_core/infrastructure/http_data_source.rb +12 -8
- data/lib/wolf_core/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14d70c706c658014c77b0edfef7df110c0c5d99d719ab312f4b787c22f4f07da
|
4
|
+
data.tar.gz: f5c19c72c02f24f87f955c9dbeccc23e7413256ae94eb3039babaf1dbaaabc5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c46720213697ec635ee8483cdfcf3f597792b24b74d6dc4638ee24e272ee91dfe69063335484c9f060f6256a99c81725a7f71c3bb8640ad2d5e91af2f0fc65b5
|
7
|
+
data.tar.gz: 53fa0341be43a726de34f7d0f777c027d64e74c6ae17873e47411ad230ed2b8527f9d7ff609b9d6cbaf497345fc485bcec0e3aab50de87cc2a74ca000091228e
|
@@ -4,26 +4,30 @@ module WolfCore
|
|
4
4
|
|
5
5
|
TIMEOUT = 900
|
6
6
|
|
7
|
-
def http_get(url:, headers: {}, query: nil, timeout:
|
8
|
-
|
7
|
+
def http_get(url:, headers: {}, query: nil, timeout: nil)
|
8
|
+
timeout ||= TIMEOUT
|
9
|
+
HTTParty.get(url, headers: headers, query: query, timeout: timeout, open_timeout: timeout, read_timeout: timeout)
|
9
10
|
end
|
10
11
|
|
11
|
-
def http_post(url:, headers: {}, query: nil, body: nil, timeout:
|
12
|
+
def http_post(url:, headers: {}, query: nil, body: nil, timeout: nil)
|
12
13
|
headers['Content-Type'] ||= 'application/json'
|
13
14
|
body = body&.to_json if headers['Content-Type'] == 'application/json'
|
14
|
-
|
15
|
+
timeout ||= TIMEOUT
|
16
|
+
HTTParty.post(url, headers: headers, query: query, body: body, timeout: timeout, open_timeout: timeout, read_timeout: timeout)
|
15
17
|
end
|
16
18
|
|
17
|
-
def http_put(url:, headers: {}, query: nil, body: nil, timeout:
|
19
|
+
def http_put(url:, headers: {}, query: nil, body: nil, timeout: nil)
|
18
20
|
headers['Content-Type'] ||= 'application/json'
|
19
21
|
body = body&.to_json if headers['Content-Type'] == 'application/json'
|
20
|
-
|
22
|
+
timeout ||= TIMEOUT
|
23
|
+
HTTParty.put(url, headers: headers, query: query, body: body, timeout: timeout, open_timeout: timeout, read_timeout: timeout)
|
21
24
|
end
|
22
25
|
|
23
|
-
def http_patch(url:, headers: {}, query: nil, body: nil, timeout:
|
26
|
+
def http_patch(url:, headers: {}, query: nil, body: nil, timeout: nil)
|
24
27
|
headers['Content-Type'] ||= 'application/json'
|
25
28
|
body = body&.to_json if headers['Content-Type'] == 'application/json'
|
26
|
-
|
29
|
+
timeout ||= TIMEOUT
|
30
|
+
HTTParty.patch(url, headers: headers, query: query, body: body, timeout: timeout, open_timeout: timeout, read_timeout: timeout)
|
27
31
|
end
|
28
32
|
end
|
29
33
|
end
|
data/lib/wolf_core/version.rb
CHANGED