Age | Commit message (Collapse) | Author |
|
|
|
All timeouts are in milliseconds. Reflect this in the documentation so
it is explicit that it is so.
|
|
Add function to retreive current options, httpc:get_options/1,2.
OTP-9979
|
|
|
|
Also fixed cookie_header/3 and updated documented
accordingly. Also added documentation for undocumented
URI parse option.
|
|
OTP-9522
|
|
OTP-9365
|
|
|
|
Conflicts:
lib/inets/doc/src/notes.xml
Fixed release notes after merge.
|
|
|
|
Also fixed some of the documentation (types).
|
|
bmk/inets/httpc/support_upload_body_streaming/OTP-OTP-9094
Conflicts:
lib/inets/src/http_client/httpc.erl
lib/inets/test/httpc_SUITE.erl
|
|
|
|
* Assure store_cookies (and verify_cookies) is documented instead of the
nonexistent store_cookie and verify_cookie.
* Make sure the cookies option is not called cookie in comments.
* Sprinkle <c>...</c> arround symbols and code snippets in text.
* Grammar, wording, and punctuation fixes.
* Formalize See gen_tcp:connect/3,4 using <seealso>.
|
|
|
|
added missing include directory.
|
|
This is specially useful when a client doesn't know in advance the
length of the payload (so that it can't set the
Content-Length header).
Example:
-module(httpc_post_stream_test).
-compile(export_all).
prepare_data() ->
crypto:start(),
{ok, Fd} = file:open("test_data.dat", [binary, write]),
ok = file:write(Fd, lists:duplicate(crypto:rand_uniform(8182, 32768), "1")),
ok = file:close(Fd).
test() ->
inets:start(),
ok = prepare_data(),
{ok, Fd1} = file:open("test_data.dat", [binary, read]),
BodyFun = fun(Fd) ->
case file:read(Fd, 512) of
eof ->
eof;
{ok, Data} ->
{ok, Data, Fd}
end
end,
%% header 'Transfer-Encoding: chunked' is added by httpc
{ok, {{_,200,_}, _, _}} = httpc:request(post, {"http://localhost:8888",
[], "text/plain", {chunkify, BodyFun, Fd1}}, [], []),
ok = file:close(Fd1).
|
|
This is a must when uploading large bodies that are to large to store
in a string or binary.
Besides a string or binary, a body can now be a function and
an accumulator.
Example:
-module(httpc_post_stream_test).
-compile(export_all).
-define(LEN, 1024 * 1024).
prepare_data() ->
{ok, Fd} = file:open("test_data.dat", [binary, write]),
ok = file:write(Fd, lists:duplicate(?LEN, "1")),
ok = file:close(Fd).
test() ->
inets:start(),
ok = prepare_data(),
{ok, Fd1} = file:open("test_data.dat", [binary, read]),
BodyFun = fun(Fd) ->
case file:read(Fd, 512) of
eof ->
eof;
{ok, Data} ->
{ok, Data, Fd}
end
end,
{ok, {{_,200,_}, _, _}} = httpc:request(post, {"http://localhost:8888",
[{"content-length", integer_to_list(?LEN)}], "text/plain", {BodyFun, Fd1}}, [], []),
ok = file:close(Fd1).
|
|
OTP-8564: Update deeprication status.
OTP-8573: Inets mod_alias URL rewrite.
|
|
|
|
OTP-8431: [email protected]
|
|
OTP-8349, OTP-8351, OTP-8352, OTP-8359 & OTP-8371.
|
|
OTP-8351, OTP-8359 & OTP-8371.
|