Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/prismic/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def self.get(url, access_token=nil, http_client=Prismic::DefaultHTTPClient, api_
res = http_client.get(url, data, 'Accept' => 'application/json')
case res.code
when '200'
res
res.body
when '401', '403'
begin
json = JSON.load(res.body)
Expand All @@ -205,7 +205,7 @@ def self.start(url, opts={})
cache = opts.has_key?(:cache) ? opts[:cache] : Prismic::DefaultCache

resp = get(url, access_token, http_client, api_cache)
json = JSON.load(resp.body)
json = JSON.load(resp)
parse_api_response(json, access_token, http_client, cache)
end

Expand Down