4
%% Copyright Ericsson AB 2002-2010. All Rights Reserved.
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/.
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
21
%%% Description: OLD API MODULE - USE httpc INSTEAD
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}).
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,
55
%%%=========================================================================
57
%%%=========================================================================
59
%%--------------------------------------------------------------------------
60
%% request(Url [, Profile]) ->
61
%% request(Method, Request, HTTPOptions, Options [, Profile])
62
%%--------------------------------------------------------------------------
64
request(Url) -> httpc:request(Url).
65
request(Url, Profile) -> httpc:request(Url, Profile).
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).
73
%%--------------------------------------------------------------------------
74
%% cancel_request(RequestId [, Profile])
75
%%-------------------------------------------------------------------------
77
cancel_request(RequestId) ->
78
httpc:cancel_request(RequestId).
79
cancel_request(RequestId, Profile) ->
80
httpc:cancel_request(RequestId, Profile).
83
%%--------------------------------------------------------------------------
84
%% set_options(Options [, Profile])
85
%% set_option(Key, Value [, Profile])
86
%%-------------------------------------------------------------------------
88
set_options(Options) ->
89
httpc:set_options(Options).
90
set_options(Options, Profile) ->
91
httpc:set_options(Options, Profile).
93
set_option(Key, Value) ->
94
httpc:set_option(Key, Value).
95
set_option(Key, Value, Profile) ->
96
httpc:set_option(Key, Value, Profile).
99
%%--------------------------------------------------------------------------
100
%% verify_cookies(SetCookieHeaders, Url [, Profile])
101
%%-------------------------------------------------------------------------
103
verify_cookies(SetCookieHeaders, Url) ->
104
httpc:store_cookies(SetCookieHeaders, Url).
105
verify_cookies(SetCookieHeaders, Url, Profile) ->
106
httpc:store_cookies(SetCookieHeaders, Url, Profile).
109
%%--------------------------------------------------------------------------
110
%% cookie_header(Url [, Profile])
111
%%-------------------------------------------------------------------------
113
cookie_header(Url) ->
114
httpc:cookie_header(Url).
115
cookie_header(Url, Profile) ->
116
httpc:cookie_header(Url, Profile).
119
%%--------------------------------------------------------------------------
121
%%-------------------------------------------------------------------------
124
httpc:stream_next(Pid).
127
%%--------------------------------------------------------------------------
129
%%-------------------------------------------------------------------------
132
httpc:default_profile().