main.ex 274 B

12345678910111213
  1. defmodule WeberFramework.Main do
  2. use Weber.Controller
  3. def action_json(_, _) do
  4. {:json, [message: "Hello, world!"], [{"Content-type", "application/json"}]}
  5. end
  6. def action_text(_, _) do
  7. {:text, "Hello, world!", [{"Content-type", "text/plain"}]}
  8. end
  9. end