~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/inets/src/http_client/http.erl

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
%%
2
 
%% %CopyrightBegin%
3
 
%%
4
 
%% Copyright Ericsson AB 2002-2010. All Rights Reserved.
5
 
%%
6
 
%% The contents of this file are subject to the Erlang Public License,
7
 
%% Version 1.1, (the "License"); you may not use this file except in
8
 
%% compliance with the License. You should have received a copy of the
9
 
%% Erlang Public License along with this software. If not, it can be
10
 
%% retrieved online at http://www.erlang.org/.
11
 
%%
12
 
%% Software distributed under the License is distributed on an "AS IS"
13
 
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
 
%% the License for the specific language governing rights and limitations
15
 
%% under the License.
16
 
%%
17
 
%% %CopyrightEnd%
18
 
%%
19
 
%%
20
 
 
21
 
%%% Description: OLD API MODULE - USE httpc INSTEAD
22
 
 
23
 
-module(http).
24
 
 
25
 
-deprecated({request,         1, next_major_release}).
26
 
-deprecated({request,         2, next_major_release}).
27
 
-deprecated({request,         4, next_major_release}).
28
 
-deprecated({request,         5, next_major_release}).
29
 
-deprecated({cancel_request,  1, next_major_release}).
30
 
-deprecated({cancel_request,  2, next_major_release}).
31
 
-deprecated({set_option,      2, next_major_release}).
32
 
-deprecated({set_option,      3, next_major_release}).
33
 
-deprecated({set_options,     1, next_major_release}).
34
 
-deprecated({set_options,     2, next_major_release}).
35
 
-deprecated({verify_cookies,  2, next_major_release}).
36
 
-deprecated({verify_cookies,  3, next_major_release}).
37
 
-deprecated({cookie_header,   1, next_major_release}).
38
 
-deprecated({cookie_header,   2, next_major_release}).
39
 
-deprecated({stream_next,     1, next_major_release}).
40
 
-deprecated({default_profile, 0, next_major_release}).
41
 
 
42
 
%% Deprecated
43
 
-export([
44
 
         request/1, request/2, request/4, request/5,
45
 
         cancel_request/1, cancel_request/2,
46
 
         set_option/2, set_option/3,
47
 
         set_options/1, set_options/2,
48
 
         verify_cookies/2, verify_cookies/3, 
49
 
         cookie_header/1, cookie_header/2, 
50
 
         stream_next/1,
51
 
         default_profile/0
52
 
        ]).
53
 
 
54
 
 
55
 
%%%=========================================================================
56
 
%%%  API
57
 
%%%=========================================================================
58
 
 
59
 
%%--------------------------------------------------------------------------
60
 
%% request(Url [, Profile]) ->
61
 
%% request(Method, Request, HTTPOptions, Options [, Profile])
62
 
%%--------------------------------------------------------------------------
63
 
 
64
 
request(Url)          -> httpc:request(Url).
65
 
request(Url, Profile) -> httpc:request(Url, Profile).
66
 
 
67
 
request(Method, Request, HttpOptions, Options) ->
68
 
    httpc:request(Method, Request, HttpOptions, Options). 
69
 
request(Method, Request, HttpOptions, Options, Profile) ->
70
 
    httpc:request(Method, Request, HttpOptions, Options, Profile). 
71
 
 
72
 
 
73
 
%%--------------------------------------------------------------------------
74
 
%% cancel_request(RequestId [, Profile])
75
 
%%-------------------------------------------------------------------------
76
 
 
77
 
cancel_request(RequestId) ->
78
 
    httpc:cancel_request(RequestId).
79
 
cancel_request(RequestId, Profile) ->
80
 
    httpc:cancel_request(RequestId, Profile).
81
 
 
82
 
 
83
 
%%--------------------------------------------------------------------------
84
 
%% set_options(Options [, Profile])
85
 
%% set_option(Key, Value [, Profile])
86
 
%%-------------------------------------------------------------------------
87
 
 
88
 
set_options(Options) ->
89
 
    httpc:set_options(Options).
90
 
set_options(Options, Profile) ->
91
 
    httpc:set_options(Options, Profile).
92
 
 
93
 
set_option(Key, Value) ->
94
 
    httpc:set_option(Key, Value).
95
 
set_option(Key, Value, Profile) ->
96
 
    httpc:set_option(Key, Value, Profile).
97
 
 
98
 
 
99
 
%%--------------------------------------------------------------------------
100
 
%% verify_cookies(SetCookieHeaders, Url [, Profile])
101
 
%%-------------------------------------------------------------------------
102
 
 
103
 
verify_cookies(SetCookieHeaders, Url) ->
104
 
    httpc:store_cookies(SetCookieHeaders, Url).
105
 
verify_cookies(SetCookieHeaders, Url, Profile) ->
106
 
    httpc:store_cookies(SetCookieHeaders, Url, Profile).
107
 
 
108
 
 
109
 
%%--------------------------------------------------------------------------
110
 
%% cookie_header(Url [, Profile])
111
 
%%-------------------------------------------------------------------------
112
 
 
113
 
cookie_header(Url) ->
114
 
    httpc:cookie_header(Url).
115
 
cookie_header(Url, Profile) ->
116
 
    httpc:cookie_header(Url, Profile).
117
 
 
118
 
 
119
 
%%--------------------------------------------------------------------------
120
 
%% stream_next(Pid)
121
 
%%-------------------------------------------------------------------------
122
 
 
123
 
stream_next(Pid) ->
124
 
    httpc:stream_next(Pid).
125
 
 
126
 
 
127
 
%%--------------------------------------------------------------------------
128
 
%% default_profile()
129
 
%%-------------------------------------------------------------------------
130
 
 
131
 
default_profile() ->
132
 
    httpc:default_profile().