Merge pull request #16 from namjae/master
reasonable default for httpoison_options
This commit is contained in:
commit
15394355fd
|
@ -72,7 +72,7 @@ defmodule Readability do
|
||||||
@spec summarize(url, options) :: Summary.t
|
@spec summarize(url, options) :: Summary.t
|
||||||
def summarize(url, opts \\ []) do
|
def summarize(url, opts \\ []) do
|
||||||
opts = Keyword.merge(opts, [page_url: url])
|
opts = Keyword.merge(opts, [page_url: url])
|
||||||
httpoison_options = Application.get_env :readability, :httpoison_options
|
httpoison_options = Application.get_env :readability, :httpoison_options, []
|
||||||
%{status_code: _, body: raw_html} = HTTPoison.get!(url, [], httpoison_options)
|
%{status_code: _, body: raw_html} = HTTPoison.get!(url, [], httpoison_options)
|
||||||
html_tree = Helper.normalize(raw_html)
|
html_tree = Helper.normalize(raw_html)
|
||||||
article_tree = html_tree
|
article_tree = html_tree
|
||||||
|
|
Loading…
Reference in New Issue