socialHub_httpUtility 1.0.4 → 1.0.5
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 +4 -4
- data/lib/socialHub_httpUtility/version.rb +1 -1
- data/lib/socialHub_httpUtility.rb +8 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f77801588515b923bca314a025f29d077d75f12e
|
|
4
|
+
data.tar.gz: dce264e9753fc96e3f82e7dd310677f2715dbc1f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dce210001102bf0d56c8e724332a77ec9cf06ea81be79227639414101c502d8cecb7aca444fc16cd5fa24a56e7b0549e3565d235c05f8589f2baa0ad010819d6
|
|
7
|
+
data.tar.gz: 5c58c2dc64b7a907a2f823ff884587b5594e09fe690c7df253de13a1af47651943c4332b1f495e85e27880551f68446d9d133424cdf9fe629df3d86372849a0f
|
|
@@ -6,6 +6,7 @@ module SocialHubHttpUtility
|
|
|
6
6
|
url = domain+path
|
|
7
7
|
http_end_index = url.index(':')
|
|
8
8
|
http_type = url[0 , http_end_index]
|
|
9
|
+
puts "http Type ",http_type
|
|
9
10
|
uri = URI.parse(url)
|
|
10
11
|
uri.query = URI.encode_www_form( params)
|
|
11
12
|
http = Net::HTTP.new(uri.host, uri.port)
|
|
@@ -28,10 +29,10 @@ module SocialHubHttpUtility
|
|
|
28
29
|
metadata = {}
|
|
29
30
|
begin
|
|
30
31
|
res = http.request(request)
|
|
31
|
-
|
|
32
|
+
puts "resppppponse body" , res.body
|
|
32
33
|
case res
|
|
33
34
|
when Net::HTTPSuccess then
|
|
34
|
-
metadata["statusCode"] = 1
|
|
35
|
+
metadata["statusCode"] = 1
|
|
35
36
|
metadata["reason"] = "SUCCESS"
|
|
36
37
|
response["metadata"] = metadata
|
|
37
38
|
response["http_response"] = res
|
|
@@ -60,6 +61,8 @@ module SocialHubHttpUtility
|
|
|
60
61
|
metadata["reason"] = e.message
|
|
61
62
|
response["metadata"] = metadata
|
|
62
63
|
response["http_response"] = {}
|
|
64
|
+
logger.error e.message
|
|
65
|
+
e.backtrace.each { |line| logger.error line }
|
|
63
66
|
begin
|
|
64
67
|
log(log_params, distination_service, metadata)
|
|
65
68
|
rescue
|
|
@@ -92,7 +95,7 @@ module SocialHubHttpUtility
|
|
|
92
95
|
metadata = {}
|
|
93
96
|
begin
|
|
94
97
|
res = http.post(uri.path, post_data, headers)
|
|
95
|
-
|
|
98
|
+
puts "resppppponse body" , res.body
|
|
96
99
|
case res
|
|
97
100
|
when Net::HTTPSuccess then
|
|
98
101
|
metadata["statusCode"] = 1
|
|
@@ -125,6 +128,8 @@ module SocialHubHttpUtility
|
|
|
125
128
|
metadata["reason"] = e.message
|
|
126
129
|
response["metadata"] = metadata
|
|
127
130
|
response["http_response"] = {}
|
|
131
|
+
logger.error e.message
|
|
132
|
+
e.backtrace.each { |line| logger.error line }
|
|
128
133
|
begin
|
|
129
134
|
log(log_params, distination_service, metadata)
|
|
130
135
|
rescue
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: socialHub_httpUtility
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- AbdAllah Elabasery
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-08-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|