<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://elixirblocks.com/index.php?action=history&amp;feed=atom&amp;title=LiveView_Web_API_Request_Example</id>
	<title>LiveView Web API Request Example - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://elixirblocks.com/index.php?action=history&amp;feed=atom&amp;title=LiveView_Web_API_Request_Example"/>
	<link rel="alternate" type="text/html" href="http://elixirblocks.com/index.php?title=LiveView_Web_API_Request_Example&amp;action=history"/>
	<updated>2026-06-02T06:19:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>http://elixirblocks.com/index.php?title=LiveView_Web_API_Request_Example&amp;diff=1905&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;&lt;source&gt; defmodule AppWeb.Sandbox do   use AppWeb, :live_view    def mount(_params, _session, socket) do     {:ok, socket}   end    def handle_event(&quot;start_task&quot;, _params, socket) do     Task.async(fn -&gt; Req.get!(&quot;https://api.github.com/repos/wojtekmach/req&quot;) end)     {:noreply, socket}   end    def handle_info({ref, result}, socket) do     Process.demonitor(ref, [:flush])     IO.inspect&quot;________________________________________________________________________________&quot;...&quot;</title>
		<link rel="alternate" type="text/html" href="http://elixirblocks.com/index.php?title=LiveView_Web_API_Request_Example&amp;diff=1905&amp;oldid=prev"/>
		<updated>2025-05-10T07:00:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;source&amp;gt; defmodule AppWeb.Sandbox do   use AppWeb, :live_view    def mount(_params, _session, socket) do     {:ok, socket}   end    def handle_event(&amp;quot;start_task&amp;quot;, _params, socket) do     Task.async(fn -&amp;gt; Req.get!(&amp;quot;https://api.github.com/repos/wojtekmach/req&amp;quot;) end)     {:noreply, socket}   end    def handle_info({ref, result}, socket) do     Process.demonitor(ref, [:flush])     IO.inspect&amp;quot;________________________________________________________________________________&amp;quot;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source&amp;gt;&lt;br /&gt;
defmodule AppWeb.Sandbox do&lt;br /&gt;
  use AppWeb, :live_view&lt;br /&gt;
&lt;br /&gt;
  def mount(_params, _session, socket) do&lt;br /&gt;
    {:ok, socket}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def handle_event(&amp;quot;start_task&amp;quot;, _params, socket) do&lt;br /&gt;
    Task.async(fn -&amp;gt; Req.get!(&amp;quot;https://api.github.com/repos/wojtekmach/req&amp;quot;) end)&lt;br /&gt;
    {:noreply, socket}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def handle_info({ref, result}, socket) do&lt;br /&gt;
    Process.demonitor(ref, [:flush])&lt;br /&gt;
    IO.inspect&amp;quot;________________________________________________________________________________&amp;quot;&lt;br /&gt;
    IO.inspect({:task_result_received, ref, result})&lt;br /&gt;
    {:noreply, socket}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def render(assigns) do&lt;br /&gt;
    ~H&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;button phx-click=&amp;quot;start_task&amp;quot;&amp;gt;Start Task&amp;lt;/button&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Barebones&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>