Current section
Files
Jump to
Current section
Files
doc/Furlex.Oembed.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.16.2">
<title>Furlex.Oembed – Furlex v0.3.2</title>
<link rel="stylesheet" href="dist/app-268c9dc719.css" />
<link rel="canonical" href="https://hexdocs.pm/furlex/Furlex.Oembed.html" />
<script src="dist/sidebar_items-a22f4eb43a.js"></script>
</head>
<body data-type="modules">
<script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
<div class="main">
<button class="sidebar-toggle">
<span class="icon-menu" aria-hidden="true"></span>
<span class="sr-only">Toggle Sidebar</span>
</button>
<section class="sidebar">
<a href="Furlex.html" class="sidebar-projectLink">
<div class="sidebar-projectDetails">
<h1 class="sidebar-projectName">
Furlex
</h1>
<h2 class="sidebar-projectVersion">
v0.3.2
</h2>
</div>
</a>
<div class="sidebar-search">
<span class="icon-search" aria-hidden="true"></span>
<input type="text" class="sidebar-searchInput" placeholder="search" aria-label="Search" autocomplete="off" />
</div>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">Pages</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
</ul>
<div class="gradient"></div>
<ul id="full-list" class="sidebar-fullList"></ul>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<small class="visible-xs">Furlex v0.3.2</small>
Furlex.Oembed
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L1" title="View Source" class="view-source" rel="help">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</h1>
<section id="moduledoc">
<p>A module for managing oembed data</p>
</section>
<section id="summary" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#summary">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Summary
</h1>
<div class="summary-types summary">
<h2>
<a href="#types">Types</a>
</h2>
<div class="summary-row">
<div class="summary-signature">
<a href="#t:body/0">body()</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#t:headers/0">headers()</a>
</div>
</div>
</div>
<div class="summary-functions summary">
<h2>
<a href="#functions">Functions</a>
</h2>
<div class="summary-row">
<div class="summary-signature">
<a href="#child_spec/1">child_spec(arg)</a>
</div>
<div class="summary-synopsis"><p>Returns a specification to start this module under a supervisor</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#delete/3">delete(url, headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a DELETE request to the given url</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#delete!/3">delete!(url, headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a DELETE request to the given url, raising an exception in case of
failure</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#endpoint_from_url/3">endpoint_from_url(url, params \\ %{"format" => "json"}, opts \\ [])</a>
</div>
<div class="summary-synopsis"><p>Returns an Oembed endpoint for the given url</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#fetch_providers/1">fetch_providers(type \\ :soft)</a>
</div>
<div class="summary-synopsis"><p>Fetches the list of Oembed providers</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#get/3">get(url, headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a GET request to the given url</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#get!/3">get!(url, headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a GET request to the given url, raising an exception in case of
failure</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#head/3">head(url, headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a HEAD request to the given url</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#head!/3">head!(url, headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a HEAD request to the given url, raising an exception in case of
failure</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#init/1">init(state)</a>
</div>
<div class="summary-synopsis"><p>Invoked when the server is started. <code class="inline">start_link/3</code> or <code class="inline">start/3</code> will
block until it returns</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#options/3">options(url, headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues an OPTIONS request to the given url</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#options!/3">options!(url, headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a OPTIONS request to the given url, raising an exception in case of
failure</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#patch/4">patch(url, body, headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a PATCH request to the given url</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#patch!/4">patch!(url, body, headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a PATCH request to the given url, raising an exception in case of
failure</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#post/4">post(url, body, headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a POST request to the given url</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#post!/4">post!(url, body, headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a POST request to the given url, raising an exception in case of
failure</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#process_headers/1">process_headers(headers)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#process_request_body/1">process_request_body(body)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#process_request_headers/1">process_request_headers(headers)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#process_request_options/1">process_request_options(options)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#process_response_body/1">process_response_body(body)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#process_response_chunk/1">process_response_chunk(chunk)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#process_status_code/1">process_status_code(status_code)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#process_url/1">process_url(url)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#put/4">put(url, body \\ "", headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a PUT request to the given url</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#put!/4">put!(url, body \\ "", headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues a PUT request to the given url, raising an exception in case of
failure</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#request/5">request(method, url, body \\ "", headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues an HTTP request with the given method to the given url</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#request!/5">request!(method, url, body \\ "", headers \\ [], options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Issues an HTTP request with the given method to the given url, raising an
exception in case of failure</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#start/0">start()</a>
</div>
<div class="summary-synopsis"><p>Starts HTTPoison and its dependencies</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#stream_next/1">stream_next(resp)</a>
</div>
<div class="summary-synopsis"><p>Requests the next message to be streamed for a given <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html"><code class="inline">HTTPoison.AsyncResponse</code></a></p>
</div>
</div>
</div>
</section>
<section id="types" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#types">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Types
</h1>
<div class="types-list">
<div class="detail" id="t:body/0">
<div class="detail-header">
<a href="#t:body/0" class="detail-link" title="Link to this type">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this type</span>
</a>
<span class="signature">body()</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>body() :: <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Base.html#t:body/0">HTTPoison.Base.body</a></pre>
</div>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="t:headers/0">
<div class="detail-header">
<a href="#t:headers/0" class="detail-link" title="Link to this type">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this type</span>
</a>
<span class="signature">headers()</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>headers() :: <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Base.html#t:headers/0">HTTPoison.Base.headers</a></pre>
</div>
</div>
<section class="docstring">
</section>
</div>
</div>
</section>
<section id="functions" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#functions">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Functions
</h1>
<div class="detail" id="child_spec/1">
<div class="detail-header">
<a href="#child_spec/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">child_spec(arg)</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L6" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Returns a specification to start this module under a supervisor.</p>
<p>See <a href="https://hexdocs.pm/elixir/Supervisor.html"><code class="inline">Supervisor</code></a>.</p>
</section>
</div>
<div class="detail" id="delete/3">
<span id="delete/1"></span>
<span id="delete/2"></span>
<div class="detail-header">
<a href="#delete/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">delete(url, headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>delete(binary, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
{:ok, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> | <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a>} |
{:error, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Error.html#t:t/0">HTTPoison.Error.t</a>}</pre>
</div>
</div>
<section class="docstring">
<p>Issues a DELETE request to the given url.</p>
<p>Returns <code class="inline">{:ok, response}</code> if the request is successful, <code class="inline">{:error, reason}</code>
otherwise.</p>
<p>See <a href="#request/5"><code class="inline">request/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="delete!/3">
<span id="delete!/1"></span>
<span id="delete!/2"></span>
<div class="detail-header">
<a href="#delete!/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">delete!(url, headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>delete!(binary, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> |
<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a></pre>
</div>
</div>
<section class="docstring">
<p>Issues a DELETE request to the given url, raising an exception in case of
failure.</p>
<p>If the request does not fail, the response is returned.</p>
<p>See <a href="#request!/5"><code class="inline">request!/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="endpoint_from_url/3">
<span id="endpoint_from_url/1"></span>
<span id="endpoint_from_url/2"></span>
<div class="detail-header">
<a href="#endpoint_from_url/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">endpoint_from_url(url, params \\ %{"format" => "json"}, opts \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L52" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Returns an Oembed endpoint for the given url</p>
<h2 id="endpoint_from_url/3-examples" class="section-heading">
<a href="#endpoint_from_url/3-examples" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Examples
</h2>
<p> iex> Oembed.endpoint_from_url “https://vimeo.com/88856141”</p>
<p> iex> Oembed.endpoint_from_url “https://vimeo.com/88856141”, %{“format” => “xml”}</p>
</section>
</div>
<div class="detail" id="fetch_providers/1">
<span id="fetch_providers/0"></span>
<div class="detail-header">
<a href="#fetch_providers/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">fetch_providers(type \\ :soft)</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L30" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>fetch_providers(<a href="https://hexdocs.pm/elixir/Atom.html#t:t/0">Atom.t</a>) :: {:ok, <a href="https://hexdocs.pm/elixir/List.html#t:t/0">List.t</a>} | {:error, <a href="https://hexdocs.pm/elixir/Atom.html#t:t/0">Atom.t</a>}</pre>
</div>
</div>
<section class="docstring">
<p>Fetches the list of Oembed providers</p>
<p>Soft fetch will fetch cached providers. Hard fetch requests
providers from oembed.com and purges the cache.</p>
</section>
</div>
<div class="detail" id="get/3">
<span id="get/1"></span>
<span id="get/2"></span>
<div class="detail-header">
<a href="#get/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">get(url, headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>get(binary, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
{:ok, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> | <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a>} |
{:error, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Error.html#t:t/0">HTTPoison.Error.t</a>}</pre>
</div>
</div>
<section class="docstring">
<p>Issues a GET request to the given url.</p>
<p>Returns <code class="inline">{:ok, response}</code> if the request is successful, <code class="inline">{:error, reason}</code>
otherwise.</p>
<p>See <a href="#request/5"><code class="inline">request/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="get!/3">
<span id="get!/1"></span>
<span id="get!/2"></span>
<div class="detail-header">
<a href="#get!/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">get!(url, headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>get!(binary, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> |
<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a></pre>
</div>
</div>
<section class="docstring">
<p>Issues a GET request to the given url, raising an exception in case of
failure.</p>
<p>If the request does not fail, the response is returned.</p>
<p>See <a href="#request!/5"><code class="inline">request!/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="head/3">
<span id="head/1"></span>
<span id="head/2"></span>
<div class="detail-header">
<a href="#head/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">head(url, headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>head(binary, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
{:ok, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> | <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a>} |
{:error, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Error.html#t:t/0">HTTPoison.Error.t</a>}</pre>
</div>
</div>
<section class="docstring">
<p>Issues a HEAD request to the given url.</p>
<p>Returns <code class="inline">{:ok, response}</code> if the request is successful, <code class="inline">{:error, reason}</code>
otherwise.</p>
<p>See <a href="#request/5"><code class="inline">request/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="head!/3">
<span id="head!/1"></span>
<span id="head!/2"></span>
<div class="detail-header">
<a href="#head!/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">head!(url, headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>head!(binary, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> |
<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a></pre>
</div>
</div>
<section class="docstring">
<p>Issues a HEAD request to the given url, raising an exception in case of
failure.</p>
<p>If the request does not fail, the response is returned.</p>
<p>See <a href="#request!/5"><code class="inline">request!/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="init/1">
<div class="detail-header">
<a href="#init/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">init(state)</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L99" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Invoked when the server is started. <code class="inline">start_link/3</code> or <code class="inline">start/3</code> will
block until it returns.</p>
<p><code class="inline">args</code> is the argument term (second argument) passed to <code class="inline">start_link/3</code>.</p>
<p>Returning <code class="inline">{:ok, state}</code> will cause <code class="inline">start_link/3</code> to return
<code class="inline">{:ok, pid}</code> and the process to enter its loop.</p>
<p>Returning <code class="inline">{:ok, state, timeout}</code> is similar to <code class="inline">{:ok, state}</code>
except <code class="inline">handle_info(:timeout, state)</code> will be called after <code class="inline">timeout</code>
milliseconds if no messages are received within the timeout.</p>
<p>Returning <code class="inline">{:ok, state, :hibernate}</code> is similar to
<code class="inline">{:ok, state}</code> except the process is hibernated before entering the loop. See
<code class="inline">c:handle_call/3</code> for more information on hibernation.</p>
<p>Returning <code class="inline">:ignore</code> will cause <code class="inline">start_link/3</code> to return <code class="inline">:ignore</code> and the
process will exit normally without entering the loop or calling <code class="inline">c:terminate/2</code>.
If used when part of a supervision tree the parent supervisor will not fail
to start nor immediately try to restart the <a href="https://hexdocs.pm/elixir/GenServer.html"><code class="inline">GenServer</code></a>. The remainder of the
supervision tree will be (re)started and so the <a href="https://hexdocs.pm/elixir/GenServer.html"><code class="inline">GenServer</code></a> should not be
required by other processes. It can be started later with
<a href="https://hexdocs.pm/elixir/Supervisor.html#restart_child/2"><code class="inline">Supervisor.restart_child/2</code></a> as the child specification is saved in the parent
supervisor. The main use cases for this are:</p>
<ul>
<li>The <a href="https://hexdocs.pm/elixir/GenServer.html"><code class="inline">GenServer</code></a> is disabled by configuration but might be enabled later.
</li>
<li>An error occurred and it will be handled by a different mechanism than the
<a href="https://hexdocs.pm/elixir/Supervisor.html"><code class="inline">Supervisor</code></a>. Likely this approach involves calling <a href="https://hexdocs.pm/elixir/Supervisor.html#restart_child/2"><code class="inline">Supervisor.restart_child/2</code></a>
after a delay to attempt a restart.
</li>
</ul>
<p>Returning <code class="inline">{:stop, reason}</code> will cause <code class="inline">start_link/3</code> to return
<code class="inline">{:error, reason}</code> and the process to exit with reason <code class="inline">reason</code> without
entering the loop or calling <code class="inline">c:terminate/2</code>.</p>
<p>Callback implementation for <a href="https://hexdocs.pm/elixir/GenServer.html#c:init/1"><code class="inline">GenServer.init/1</code></a>.</p>
</section>
</div>
<div class="detail" id="options/3">
<span id="options/1"></span>
<span id="options/2"></span>
<div class="detail-header">
<a href="#options/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">options(url, headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>options(binary, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
{:ok, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> | <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a>} |
{:error, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Error.html#t:t/0">HTTPoison.Error.t</a>}</pre>
</div>
</div>
<section class="docstring">
<p>Issues an OPTIONS request to the given url.</p>
<p>Returns <code class="inline">{:ok, response}</code> if the request is successful, <code class="inline">{:error, reason}</code>
otherwise.</p>
<p>See <a href="#request/5"><code class="inline">request/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="options!/3">
<span id="options!/1"></span>
<span id="options!/2"></span>
<div class="detail-header">
<a href="#options!/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">options!(url, headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>options!(binary, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> |
<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a></pre>
</div>
</div>
<section class="docstring">
<p>Issues a OPTIONS request to the given url, raising an exception in case of
failure.</p>
<p>If the request does not fail, the response is returned.</p>
<p>See <a href="#request!/5"><code class="inline">request!/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="patch/4">
<span id="patch/2"></span>
<span id="patch/3"></span>
<div class="detail-header">
<a href="#patch/4" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">patch(url, body, headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>patch(binary, any, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
{:ok, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> | <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a>} |
{:error, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Error.html#t:t/0">HTTPoison.Error.t</a>}</pre>
</div>
</div>
<section class="docstring">
<p>Issues a PATCH request to the given url.</p>
<p>Returns <code class="inline">{:ok, response}</code> if the request is successful, <code class="inline">{:error, reason}</code>
otherwise.</p>
<p>See <a href="#request/5"><code class="inline">request/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="patch!/4">
<span id="patch!/2"></span>
<span id="patch!/3"></span>
<div class="detail-header">
<a href="#patch!/4" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">patch!(url, body, headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>patch!(binary, any, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> |
<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a></pre>
</div>
</div>
<section class="docstring">
<p>Issues a PATCH request to the given url, raising an exception in case of
failure.</p>
<p>If the request does not fail, the response is returned.</p>
<p>See <a href="#request!/5"><code class="inline">request!/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="post/4">
<span id="post/2"></span>
<span id="post/3"></span>
<div class="detail-header">
<a href="#post/4" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">post(url, body, headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>post(binary, any, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
{:ok, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> | <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a>} |
{:error, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Error.html#t:t/0">HTTPoison.Error.t</a>}</pre>
</div>
</div>
<section class="docstring">
<p>Issues a POST request to the given url.</p>
<p>Returns <code class="inline">{:ok, response}</code> if the request is successful, <code class="inline">{:error, reason}</code>
otherwise.</p>
<p>See <a href="#request/5"><code class="inline">request/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="post!/4">
<span id="post!/2"></span>
<span id="post!/3"></span>
<div class="detail-header">
<a href="#post!/4" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">post!(url, body, headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>post!(binary, any, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> |
<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a></pre>
</div>
</div>
<section class="docstring">
<p>Issues a POST request to the given url, raising an exception in case of
failure.</p>
<p>If the request does not fail, the response is returned.</p>
<p>See <a href="#request!/5"><code class="inline">request!/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="process_headers/1">
<div class="detail-header">
<a href="#process_headers/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">process_headers(headers)</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="process_request_body/1">
<div class="detail-header">
<a href="#process_request_body/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">process_request_body(body)</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>process_request_body(any) :: <a href="#t:body/0">body</a></pre>
</div>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="process_request_headers/1">
<div class="detail-header">
<a href="#process_request_headers/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">process_request_headers(headers)</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>process_request_headers(<a href="#t:headers/0">headers</a>) :: <a href="#t:headers/0">headers</a></pre>
</div>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="process_request_options/1">
<div class="detail-header">
<a href="#process_request_options/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">process_request_options(options)</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="process_response_body/1">
<div class="detail-header">
<a href="#process_response_body/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">process_response_body(body)</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L115" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>process_response_body(binary) :: any</pre>
</div>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="process_response_chunk/1">
<div class="detail-header">
<a href="#process_response_chunk/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">process_response_chunk(chunk)</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="process_status_code/1">
<div class="detail-header">
<a href="#process_status_code/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">process_status_code(status_code)</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="process_url/1">
<div class="detail-header">
<a href="#process_url/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">process_url(url)</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L111" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="put/4">
<span id="put/1"></span>
<span id="put/2"></span>
<span id="put/3"></span>
<div class="detail-header">
<a href="#put/4" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">put(url, body \\ "", headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>put(binary, any, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
{:ok, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> | <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a>} |
{:error, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Error.html#t:t/0">HTTPoison.Error.t</a>}</pre>
</div>
</div>
<section class="docstring">
<p>Issues a PUT request to the given url.</p>
<p>Returns <code class="inline">{:ok, response}</code> if the request is successful, <code class="inline">{:error, reason}</code>
otherwise.</p>
<p>See <a href="#request/5"><code class="inline">request/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="put!/4">
<span id="put!/1"></span>
<span id="put!/2"></span>
<span id="put!/3"></span>
<div class="detail-header">
<a href="#put!/4" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">put!(url, body \\ "", headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Issues a PUT request to the given url, raising an exception in case of
failure.</p>
<p>If the request does not fail, the response is returned.</p>
<p>See <a href="#request!/5"><code class="inline">request!/5</code></a> for more detailed information.</p>
</section>
</div>
<div class="detail" id="request/5">
<span id="request/2"></span>
<span id="request/3"></span>
<span id="request/4"></span>
<div class="detail-header">
<a href="#request/5" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">request(method, url, body \\ "", headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>request(atom, binary, any, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) ::
{:ok, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a> | <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a>} |
{:error, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Error.html#t:t/0">HTTPoison.Error.t</a>}</pre>
</div>
</div>
<section class="docstring">
<p>Issues an HTTP request with the given method to the given url.</p>
<p>This function is usually used indirectly by <a href="#get/3"><code class="inline">get/3</code></a>, <a href="#post/4"><code class="inline">post/4</code></a>, <a href="#put/4"><code class="inline">put/4</code></a>, etc</p>
<p>Args:</p>
<ul>
<li><code class="inline">method</code> - HTTP method as an atom (<code class="inline">:get</code>, <code class="inline">:head</code>, <code class="inline">:post</code>, <code class="inline">:put</code>,
<code class="inline">:delete</code>, etc.)
</li>
<li><code class="inline">url</code> - target url as a binary string or char list
</li>
<li><code class="inline">body</code> - request body. See more below
</li>
<li><code class="inline">headers</code> - HTTP headers as an orddict (e.g., <code class="inline">[{"Accept", "application/json"}]</code>)
</li>
<li><code class="inline">options</code> - Keyword list of options
</li>
</ul>
<p>Body:</p>
<ul>
<li>binary, char list or an iolist
</li>
<li><code class="inline">{:form, [{K, V}, ...]}</code> - send a form url encoded
</li>
<li><code class="inline">{:file, "/path/to/file"}</code> - send a file
</li>
<li><code class="inline">{:stream, enumerable}</code> - lazily send a stream of binaries/charlists
</li>
</ul>
<p>Options:</p>
<ul>
<li><code class="inline">:timeout</code> - timeout to establish a connection, in milliseconds. Default is 8000
</li>
<li><code class="inline">:recv_timeout</code> - timeout used when receiving a connection. Default is 5000
</li>
<li><code class="inline">:stream_to</code> - a PID to stream the response to
</li>
<li><code class="inline">:async</code> - if given <code class="inline">:once</code>, will only stream one message at a time, requires call to <code class="inline">stream_next</code>
</li>
<li><code class="inline">:proxy</code> - a proxy to be used for the request; it can be a regular url
or a <code class="inline">{Host, Port}</code> tuple
</li>
<li><code class="inline">:proxy_auth</code> - proxy authentication <code class="inline">{User, Password}</code> tuple
</li>
<li><code class="inline">:ssl</code> - SSL options supported by the <code class="inline">ssl</code> erlang module
</li>
<li><code class="inline">:follow_redirect</code> - a boolean that causes redirects to be followed
</li>
<li><code class="inline">:max_redirect</code> - an integer denoting the maximum number of redirects to follow
</li>
<li><code class="inline">:params</code> - an enumerable consisting of two-item tuples that will be appended to the url as query string parameters
</li>
</ul>
<p>Timeouts can be an integer or <code class="inline">:infinity</code></p>
<p>This function returns <code class="inline">{:ok, response}</code> or <code class="inline">{:ok, async_response}</code> if the
request is successful, <code class="inline">{:error, reason}</code> otherwise.</p>
<h2 id="request/5-examples" class="section-heading">
<a href="#request/5-examples" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Examples
</h2>
<pre><code class="elixir">request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])</code></pre>
</section>
</div>
<div class="detail" id="request!/5">
<span id="request!/2"></span>
<span id="request!/3"></span>
<span id="request!/4"></span>
<div class="detail-header">
<a href="#request!/5" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">request!(method, url, body \\ "", headers \\ [], options \\ [])</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>request!(atom, binary, any, <a href="#t:headers/0">headers</a>, <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>) :: <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Response.html#t:t/0">HTTPoison.Response.t</a></pre>
</div>
</div>
<section class="docstring">
<p>Issues an HTTP request with the given method to the given url, raising an
exception in case of failure.</p>
<p><a href="#request!/5"><code class="inline">request!/5</code></a> works exactly like <a href="#request/5"><code class="inline">request/5</code></a> but it returns just the
response in case of a successful request, raising an exception in case the
request fails.</p>
</section>
</div>
<div class="detail" id="start/0">
<div class="detail-header">
<a href="#start/0" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">start()</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Starts HTTPoison and its dependencies.</p>
</section>
</div>
<div class="detail" id="stream_next/1">
<div class="detail-header">
<a href="#stream_next/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">stream_next(resp)</span>
<a href="https://github.com/claytongentry/furlex/blob/master/lib/furlex/oembed.ex#L7" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>stream_next(<a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a>) ::
{:ok, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html#t:t/0">HTTPoison.AsyncResponse.t</a>} |
{:error, <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.Error.html#t:t/0">HTTPoison.Error.t</a>}</pre>
</div>
</div>
<section class="docstring">
<p>Requests the next message to be streamed for a given <a href="https://hexdocs.pm/httpoison/0.13.0/HTTPoison.AsyncResponse.html"><code class="inline">HTTPoison.AsyncResponse</code></a>.</p>
<p>See <a href="#request!/5"><code class="inline">request!/5</code></a> for more detailed information.</p>
</section>
</div>
</section>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" rel="help" target="_blank">ExDoc</a> (v0.16.2),
</span>
<span class="line">
designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
<button class="night-mode-toggle"><span class="sr-only">Switch theme</span></button>
</footer>
</div>
</div>
</section>
</div>
<script src="dist/app-4988ddd06b.js"></script>
</body>
</html>