Merge pull request #16 from namjae/master

reasonable default for httpoison_options
This commit is contained in:
Jaehyun Shin 2016-11-07 14:02:22 +09:00 committed by GitHub
commit 15394355fd
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ defmodule Readability do
@spec summarize(url, options) :: Summary.t
def summarize(url, opts \\ []) do
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)
html_tree = Helper.normalize(raw_html)
article_tree = html_tree