Skip to content

Test Methods don't seem to send body #185

@jeregrine

Description

@jeregrine

In real world usage the below works but in tests when I call

conn = post(conn, "/", %S/{"name":"Jason Stiebs","email":"[email protected]"}/)

And I try to parse it

{res, json} = JSON.decode(conn.req_body)

I get the exception that I need to fetch req_body. But I already am

conn.fetch([:params, :body, :headers])

If I add :req_body it blows up every non-post test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions