Skip to content

Improve request body io-alike objects handling #469

@ixti

Description

@ixti

As of #468 pipes will cause failure:

reader, writer = IO.pipe
writer.puts "abc"
writer.close

HTTP.post(url, :body => reader)

That is because reader is an IO that supports rewind, but it's illegal on pipes:

Errno::ESPIPE: Illegal seek

So, I think we should become more strict about what is allowed to be used as request body.

@httprb/core comments and thoughts are welcomed and appreciated!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions