瀏覽代碼

added a function to set the download_dir in the internal config ets

pull/158/head
Ulf Angermann 7 年之前
父節點
當前提交
55330e1e8a
共有 1 個檔案被更改,包括 6 行新增0 行删除
  1. +6
    -0
      src/ibrowse.erl

+ 6
- 0
src/ibrowse.erl 查看文件

@ -91,6 +91,7 @@
set_max_sessions/3,
set_max_pipeline_size/3,
set_max_attempts/3,
set_download_dir/1,
set_dest/3,
trace_on/0,
trace_off/0,
@ -487,6 +488,11 @@ set_max_pipeline_size(Host, Port, Max) when is_integer(Max), Max > 0 ->
set_max_attempts(Host, Port, Max) when is_integer(Max), Max > 0 ->
gen_server:call(?MODULE, {set_config_value, {max_attempts, Host, Port}, Max}).
%% @doc set the download directory where the files are stored
%% @spec set_download_dir(Dir::string()) -> ok
set_download_dir(Dir) ->
gen_server:call(?MODULE, {set_config_value, download_dir, Dir}).
do_send_req(Conn_Pid, Parsed_url, Headers, Method, Body, Options, Timeout) ->
case catch ibrowse_http_client:send_req(Conn_Pid, Parsed_url,
Headers, Method, ensure_bin(Body),

Loading…
取消
儲存