Skip to content

Commit 5b3f021

Browse files
committed
make response body a string
1 parent 711ee68 commit 5b3f021

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/async/http/faraday/adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def call(env)
3333

3434
response = client.send(env[:method], env[:url].request_uri, env[:request_headers], env[:body] || [])
3535

36-
save_response(env, response.status, response.body, response.headers, response.reason)
36+
save_response(env, response.status, response.body.read, response.headers, response.reason)
3737

3838
@app.call env
3939
end

spec/async/http/faraday/adapter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
response = conn.get("/index")
5050

51-
expect(response.body.read).to be == "Hello World"
51+
expect(response.body).to be == "Hello World"
5252

5353
server_task.stop
5454
end

0 commit comments

Comments
 (0)