uc3-dmp-external-api 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-external-api/client.rb +6 -1
- data/lib/uc3-dmp-external-api/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: b41876f49ab45317250eb4aeaca2ecb9635d4cd206760b30305dc1281d90617e
|
4
|
+
data.tar.gz: 220165091dccd3294ee320c44b5f20e7b61e440d40074bb33fd46bf4516f3461
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2cfa86ab698360557df42c9a64b5d52049c3e46d3d4385b6b43fcfe8e50587a86a492d3462a50459c38741a2fa1e9eaaa3b81955768a1e6f6bdad223d88731b
|
7
|
+
data.tar.gz: 8efe0a48af02913ff05b70a8f618db5a2e340d5ec06acddcbab3980ab71e14f8d4c5e2bf723ff236960975f8e9f23757b5f47b14a9094780a4676bf9d0b38fbb
|
@@ -45,7 +45,12 @@ module Uc3DmpExternalApi
|
|
45
45
|
def _process_response(resp:)
|
46
46
|
return nil if resp.body.nil? || resp.body.empty?
|
47
47
|
|
48
|
-
|
48
|
+
puts "HEADER: #{resp.headers['content-type']}"
|
49
|
+
|
50
|
+
mime = resp.headers['content-type']
|
51
|
+
mime = 'application/json' if mime_type.nil? && (rep.body.start_with?('[') || resp.body.start_with?('{'))
|
52
|
+
|
53
|
+
case mime
|
49
54
|
when 'application/json'
|
50
55
|
JSON.parse(resp.body)
|
51
56
|
else
|