LiveView Web API Request Example: Revision history

Jump to: navigation, search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

10 May 2025

  • curprev 07:0007:00, 10 May 2025Admin talk contribs 720 bytes +720 Created page with "<source> defmodule AppWeb.Sandbox do use AppWeb, :live_view def mount(_params, _session, socket) do {:ok, socket} end def handle_event("start_task", _params, socket) do Task.async(fn -> Req.get!("https://api.github.com/repos/wojtekmach/req") end) {:noreply, socket} end def handle_info({ref, result}, socket) do Process.demonitor(ref, [:flush]) IO.inspect"________________________________________________________________________________"..."