Thanks! With your help I am getting the json response but I now get this error:
Any idea how to fix it? Thanks
[info] Sent 200 in 773µs [debug] SELECT t0."id", t0."titulo", t0."url", t0."insertedat", t0."updatedat" FROM "tarefas" AS t0 [] OK query=0.3ms [error] #PID<0.428.0> running Mechanize.Endpoint terminated Server: localhost:4000 (http) Request: GET /api/tarefas ** (exit) an exception was raised: ** (Plug.Conn.AlreadySentError) the response was already sent (plug) lib/plug/conn.ex:458: Plug.Conn.resp/3 (plug) lib/plug/conn.ex:445: Plug.Conn.sendresp/3 (mechanize) web/controllers/tarefaapicontroller.ex:1: Mechanize.TarefaApiController.action/2 (mechanize) web/controllers/tarefaapicontroller.ex:1: Mechanize.TarefaApiController.phoenixcontrollerpipeline/2 (mechanize) lib/phoenix/router.ex:261: Mechanize.Router.dispatch/2 (mechanize) web/router.ex:1: Mechanize.Router.docall/2 (mechanize) lib/mechanize/endpoint.ex:1: Mechanize.Endpoint.phoenixpipeline/1 (mechanize) lib/plug/debugger.ex:93: Mechanize.Endpoint."call (overridable 3)"/2 (mechanize) lib/phoenix/endpoint/rendererrors.ex:34: Mechanize.Endpoint.call/2 (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4 (cowboy) src/cowboyprotocol.erl:442: :cowboyprotocol.execute/4
Thanks! With your help I am getting the json response but I now get this error:
Any idea how to fix it? Thanks
[info] Sent 200 in 773µs
[debug] SELECT t0."id", t0."titulo", t0."url", t0."insertedat", t0."updatedat" FROM "tarefas" AS t0 [] OK query=0.3ms
[error] #PID<0.428.0> running Mechanize.Endpoint terminated
Server: localhost:4000 (http)
Request: GET /api/tarefas
** (exit) an exception was raised:
** (Plug.Conn.AlreadySentError) the response was already sent
(plug) lib/plug/conn.ex:458: Plug.Conn.resp/3
(plug) lib/plug/conn.ex:445: Plug.Conn.sendresp/3
(mechanize) web/controllers/tarefaapicontroller.ex:1: Mechanize.TarefaApiController.action/2
(mechanize) web/controllers/tarefaapicontroller.ex:1: Mechanize.TarefaApiController.phoenixcontrollerpipeline/2
(mechanize) lib/phoenix/router.ex:261: Mechanize.Router.dispatch/2
(mechanize) web/router.ex:1: Mechanize.Router.docall/2
(mechanize) lib/mechanize/endpoint.ex:1: Mechanize.Endpoint.phoenixpipeline/1
(mechanize) lib/plug/debugger.ex:93: Mechanize.Endpoint."call (overridable 3)"/2
(mechanize) lib/phoenix/endpoint/rendererrors.ex:34: Mechanize.Endpoint.call/2
(plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
(cowboy) src/cowboyprotocol.erl:442: :cowboyprotocol.execute/4