Skip to content

redirect and :into #462

@wojtekmach

Description

@wojtekmach

Currently we have this:

iex> Req.get!("https://httpbin.org/redirect-to?url=/json", into: fn {:data, _}, {req, resp} -> dbg resp.status ; {:cont, {req, resp}} end).status

14:40:35.294 [debug] redirecting to /json
[iex:13: (file)]
resp.status #=> 200

200

I'm wondering if we should call into function for the redirect request too. I think the answer is NO. When we'd do into: File.stream!("path") we clearly don't want to write the body of the redirect response. But yeah I believe it is not documented and might not be tested so let's do fill in those gaps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions