uc3-dmp-external-api 0.0.6 → 0.0.7
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 +2 -6
- 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: dc43472126bd2936720f2b37ecb45bf7bf239d58be5d409019c5e987ecc6fb97
|
4
|
+
data.tar.gz: '038effb8560029ccf52d2f0cff14d1f66e2d5f5b71803dac1acda924bde76920'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e948db4ac6313ecaa44956321cafee5fc81e4bb41283a6574c8f29ae24dbf0e514bd101f790179c1918a171dedff0fb4f319a3f770a9550f6bb66ca360c7f73f
|
7
|
+
data.tar.gz: ff3b42fa26cd7c91b6a214ccfa19d7beb11c70fbdf6a6383d1b7da58762a42c8a4747c85beb3c0b2f8f470179a702be43bf4ff129e317f7e1bca72077f0b465a
|
@@ -47,13 +47,9 @@ module Uc3DmpExternalApi
|
|
47
47
|
|
48
48
|
mime = resp.headers['content-type']
|
49
49
|
mime = 'application/json' if mime.nil? && (rep.body.start_with?('[') || resp.body.start_with?('{'))
|
50
|
+
return resp.body.to_s unless mime == 'application/json'
|
50
51
|
|
51
|
-
|
52
|
-
when 'application/json'
|
53
|
-
JSON.parse(resp.body)
|
54
|
-
else
|
55
|
-
resp.body.to_s
|
56
|
-
end
|
52
|
+
JSON.parse(resp.body)
|
57
53
|
end
|
58
54
|
|
59
55
|
# Prepare the headers
|