nice_http 1.8.4 → 1.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nice_http/http_methods.rb +9 -3
- 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: 8230eed259e6a1a44d8fc84d06674addaf2a84516f3576944ed75ddf25c600c2
|
4
|
+
data.tar.gz: ec990b3b84242d178af775e5227f2bf6d5288461fa4d230e40de68fed4be27dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70917c6be7b0f1defaafc88a6bab4caa632194800dcd274690d87f24188880507428470ca346a9bcf8e3e41b9ed37ba151b59d7d55d9e5eb3451d78200b224bd
|
7
|
+
data.tar.gz: 90f3739074aa0c60475e9c2162f8cf3e112e0220c5d7025807e995d0d451fa1e2031e48062decea3e76b2a443f92f5a754959e133da5e573869a44c0b76d6cf5
|
@@ -107,7 +107,8 @@ module NiceHttpHttpMethods
|
|
107
107
|
@http.finish()
|
108
108
|
@http.start()
|
109
109
|
@start_time_net = Time.now if @start_time_net.nil?
|
110
|
-
|
110
|
+
@headers_orig.each {|k,v| headers_t[k] = v.call if v.is_a?(Proc) and headers_t.key?(k)}
|
111
|
+
resp = @http.get(path, headers_t)
|
111
112
|
data = resp.body
|
112
113
|
manage_response(resp, data)
|
113
114
|
end
|
@@ -239,6 +240,7 @@ module NiceHttpHttpMethods
|
|
239
240
|
@http.finish()
|
240
241
|
@http.start()
|
241
242
|
@start_time_net = Time.now if @start_time_net.nil?
|
243
|
+
@headers_orig.each {|k,v| headers_t[k] = v.call if v.is_a?(Proc) and headers_t.key?(k)}
|
242
244
|
resp, data = @http.post(path, data, headers_t)
|
243
245
|
end
|
244
246
|
manage_response(resp, data)
|
@@ -332,6 +334,7 @@ module NiceHttpHttpMethods
|
|
332
334
|
@logger.warn "The connection seems to be closed in the host machine. Trying to reconnect"
|
333
335
|
@http.finish()
|
334
336
|
@http.start()
|
337
|
+
@headers_orig.each {|k,v| headers_t[k] = v.call if v.is_a?(Proc) and headers_t.key?(k)}
|
335
338
|
@start_time_net = Time.now if @start_time_net.nil?
|
336
339
|
resp, data = @http.send_request("PUT", path, data, headers_t)
|
337
340
|
end
|
@@ -412,6 +415,7 @@ module NiceHttpHttpMethods
|
|
412
415
|
@logger.warn "The connection seems to be closed in the host machine. Trying to reconnect"
|
413
416
|
@http.finish()
|
414
417
|
@http.start()
|
418
|
+
@headers_orig.each {|k,v| headers_t[k] = v.call if v.is_a?(Proc) and headers_t.key?(k)}
|
415
419
|
@start_time_net = Time.now if @start_time_net.nil?
|
416
420
|
resp, data = @http.patch(path, data, headers_t)
|
417
421
|
end
|
@@ -527,8 +531,9 @@ module NiceHttpHttpMethods
|
|
527
531
|
@logger.warn "The connection seems to be closed in the host machine. Trying to reconnect"
|
528
532
|
@http.finish()
|
529
533
|
@http.start()
|
534
|
+
@headers_orig.each {|k,v| headers_t[k] = v.call if v.is_a?(Proc) and headers_t.key?(k)}
|
530
535
|
@start_time_net = Time.now if @start_time_net.nil?
|
531
|
-
resp, data = @http.delete(path)
|
536
|
+
resp, data = @http.delete(path, headers_t)
|
532
537
|
end
|
533
538
|
manage_response(resp, data)
|
534
539
|
|
@@ -592,8 +597,9 @@ module NiceHttpHttpMethods
|
|
592
597
|
@logger.warn "The connection seems to be closed in the host machine. Trying to reconnect"
|
593
598
|
@http.finish()
|
594
599
|
@http.start()
|
600
|
+
@headers_orig.each {|k,v| headers_t[k] = v.call if v.is_a?(Proc) and headers_t.key?(k)}
|
595
601
|
@start_time_net = Time.now if @start_time_net.nil?
|
596
|
-
resp, data = @http.head(path)
|
602
|
+
resp, data = @http.head(path, headers_t)
|
597
603
|
end
|
598
604
|
manage_response(resp, data)
|
599
605
|
return @response
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nice_http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Ruiz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nice_hash
|