thojanssens1
Function Phoenix.Endpoint.url/0 is undefined or private
Hello,
When I try to use:
IO.inspect Phoenix.Endpoint.url()
it says:
function Phoenix.Endpoint.url/0 is undefined or private
I tried to call another function from Phoenix like IO.inspect Phoenix.json_library() and it works (returns “Jason”).
Why does it say that the function url/0 is undefined or private?
Marked As Solved
aesmail
Also Liked
sb8244
When you use Phoenix.Endpoint, the __using__ macro is invoked (phoenix/lib/phoenix/endpoint.ex at v1.4.10 · phoenixframework/phoenix · GitHub). This function unquotes several other blocks of code (phoenix/lib/phoenix/endpoint.ex at v1.4.10 · phoenixframework/phoenix · GitHub).
Here you can see where url/0 is implemented (phoenix/lib/phoenix/endpoint.ex at v1.4.10 · phoenixframework/phoenix · GitHub).
The callback dictates which functions must be defined when you implement a Behavior. url/0 is one of these functions. Phoenix, of course, provides default implementations for all of these core Behaviors.
Last Post!
sb8244
When you use Phoenix.Endpoint, the __using__ macro is invoked (phoenix/lib/phoenix/endpoint.ex at v1.4.10 · phoenixframework/phoenix · GitHub). This function unquotes several other blocks of code (phoenix/lib/phoenix/endpoint.ex at v1.4.10 · phoenixframework/phoenix · GitHub).
Here you can see where url/0 is implemented (phoenix/lib/phoenix/endpoint.ex at v1.4.10 · phoenixframework/phoenix · GitHub).
The callback dictates which functions must be defined when you implement a Behavior. url/0 is one of these functions. Phoenix, of course, provides default implementations for all of these core Behaviors.
Popular in Questions
Other popular topics
Latest Phoenix Threads
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security









