uc3-dmp-external-api 0.0.7 → 0.0.8
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 +1 -4
- 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: c2818002466c6dd5a14095e41cdf7873c4c4269e6a8871d644425cdda70be60c
|
4
|
+
data.tar.gz: e34734bc3242a271c954dc5225056f2b706607e6474db57fc50803234c5e5c34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4bb1dff30d186bf54ea5c5b65b040a7d8b32245ca226c87eeca77285c6ecb2dda81ea111131f218666c90d1dacb12ea30d8e0ffff06ab016b79c877feb4a68e
|
7
|
+
data.tar.gz: 184e1113f18ffd67622364b201eb1ab54e1f3b0a5b413a52bf88c5111e3f0185a16a725c771fb9c5d57463c6664af3c4636af636d50fc67afad3de0445529f21
|
@@ -44,10 +44,7 @@ module Uc3DmpExternalApi
|
|
44
44
|
# # Handle the response body based on the Content-Type
|
45
45
|
def _process_response(resp:)
|
46
46
|
return nil if resp.body.nil? || resp.body.empty?
|
47
|
-
|
48
|
-
mime = resp.headers['content-type']
|
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'
|
47
|
+
return resp.body.to_s unless resp.headers.fetch('content-type', '').include?('application/json')
|
51
48
|
|
52
49
|
JSON.parse(resp.body)
|
53
50
|
end
|