Skip to content

Commit 07a0d12

Browse files
committed
Wrap response.
1 parent d21fa24 commit 07a0d12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

β€Žlib/jsonapi/client/request.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ def initialize(base_url, endpoint = nil)
1414
end
1515

1616
def call
17-
Net::HTTP.start(uri.host, uri.port,
18-
use_ssl: uri.scheme == 'https') do |http|
17+
response = Net::HTTP.start(uri.host, uri.port,
18+
use_ssl: uri.scheme == 'https') do |http|
1919
http.request request
2020
end
21+
22+
Response.new(response)
2123
end
2224

2325
def list

0 commit comments

Comments
 (0)