Closed kpanic closed 8 months ago
Hey there 👋🏾
Currently the port can be specified by an URI like http://localhost:4200 but in phoenix it's required to do a:
get(conn, "http://localhost:42000/my/path", ...)
Because we do an URI.parse/1 here https://github.com/elixir-plug/plug/blob/main/lib/plug/adapters/test/conn.ex#L9
URI.parse/1
Instead the port in the conn struct could be change and that should be cleaner rather than specifing a full URI, in phoenix tests.
port
conn
Thanks for creating Plug!!
PS: Hope that this PR makes sense 😉
:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:
Hey there 👋🏾
Currently the port can be specified by an URI like http://localhost:4200 but in phoenix it's required to do a:
Because we do an
URI.parse/1
here https://github.com/elixir-plug/plug/blob/main/lib/plug/adapters/test/conn.ex#L9Instead the
port
in theconn
struct could be change and that should be cleaner rather than specifing a full URI, in phoenix tests.Thanks for creating Plug!!
PS: Hope that this PR makes sense 😉