Hey there, I want to make some HTTP requests to my cowboy server
@spec call(Plug.Conn.t(), any) :: Plug.Conn.t()
def call(conn, _opts) do
conn
|> put_resp_content_type("text/plain")
|> send_resp(200, "Hello World")
end
Is it even possible to add a route here, like /api
, and when I send a HTTP request from my frontend to my server there, that I can respond? I think I need CORS for that o.O