Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to specify a port from the conn #1187

Merged

Conversation

kpanic
Copy link
Contributor

@kpanic kpanic commented Nov 15, 2023

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

Instead the port in the conn 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 😉

@kpanic kpanic marked this pull request as ready for review November 15, 2023 15:11
@josevalim josevalim merged commit 59ea007 into elixir-plug:main Jan 5, 2024
2 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants