I’m trying to connect to a local postgres repository using its UR, then post a query to this repo. I’m not sure how the URL name is to be configure. The error I get is:
{:error, %HTTPoison.Error{id: nil, reason: :nxdomain}}
My dev.exs is:
config :valiot_app, :repo_helper, %{
url: "ecto://postgres:postgres@localhost/my_repo",
header: %{
authorization:
"Bearer eyJhbGciOiJIUzUxMiIs9..."
}
}
The post that it’s trying to do:
@url Application.get_env(:valiot_app, :repo_helper).url
@header Application.get_env(:valiot_app, :repo_helper).header
{:ok, response} = HTTPoison.post(@url, body, @header)
Am I lacking in configuration?