I am writing a POST request that should send some information to a REST api using elixir, this information should be able to be accessed in the conn.body_params, however it appears empty.
My code is as follows:
conn2 = conn(:post, gameID<>"/guesses", Poison.encode!(%{guess: "p"}))
|> GameRouter.call()
assert conn2.status == 201
My plug also has the following configuration:
plug Plug.Parsers, parsers: [:urlencoded, :multipart, :json], pass: ["*/*"], json_decoder: Poison
How should it be written as to actually send the information in the POST request?