Skip to content

Commit 5b8b76a

Browse files
authored
Merge pull request #69 from mbrung/master
Store response body instead of response object
2 parents ec2c1ff + 008b392 commit 5b8b76a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/prismic/api.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def self.get(url, access_token=nil, http_client=Prismic::DefaultHTTPClient, api_
178178
res = http_client.get(url, data, 'Accept' => 'application/json')
179179
case res.code
180180
when '200'
181-
res
181+
res.body
182182
when '401', '403'
183183
begin
184184
json = JSON.load(res.body)
@@ -205,7 +205,7 @@ def self.start(url, opts={})
205205
cache = opts.has_key?(:cache) ? opts[:cache] : Prismic::DefaultCache
206206

207207
resp = get(url, access_token, http_client, api_cache)
208-
json = JSON.load(resp.body)
208+
json = JSON.load(resp)
209209
parse_api_response(json, access_token, http_client, cache)
210210
end
211211

0 commit comments

Comments
 (0)