@@ -11,8 +11,6 @@ import 'src/client.dart';
11
11
import 'src/response.dart' ;
12
12
13
13
export 'src/base_client.dart' ;
14
- export 'src/base_request.dart' ;
15
- export 'src/base_response.dart' ;
16
14
export 'src/byte_stream.dart' ;
17
15
export 'src/client.dart' ;
18
16
export 'src/exception.dart' ;
@@ -21,8 +19,6 @@ export 'src/multipart_file.dart';
21
19
export 'src/multipart_request.dart' ;
22
20
export 'src/request.dart' ;
23
21
export 'src/response.dart' ;
24
- export 'src/streamed_request.dart' ;
25
- export 'src/streamed_response.dart' ;
26
22
27
23
/// Sends an HTTP HEAD request with the given headers to the given URL, which
28
24
/// can be a [Uri] or a [String] .
@@ -32,7 +28,7 @@ export 'src/streamed_response.dart';
32
28
/// the same server, you should use a single [Client] for all of those requests.
33
29
///
34
30
/// For more fine-grained control over the request, use [Request] instead.
35
- FutureOr <Response > head (url, {Map <String , String > headers}) =>
31
+ Future <Response > head (url, {Map <String , String > headers}) =>
36
32
_withClient ((client) => client.head (url, headers: headers));
37
33
38
34
/// Sends an HTTP GET request with the given headers to the given URL, which can
@@ -43,7 +39,7 @@ FutureOr<Response> head(url, {Map<String, String> headers}) =>
43
39
/// the same server, you should use a single [Client] for all of those requests.
44
40
///
45
41
/// For more fine-grained control over the request, use [Request] instead.
46
- FutureOr <Response > get (url, {Map <String , String > headers}) =>
42
+ Future <Response > get (url, {Map <String , String > headers}) =>
47
43
_withClient ((client) => client.get (url, headers: headers));
48
44
49
45
/// Sends an HTTP POST request with the given headers and body to the given URL,
@@ -65,7 +61,7 @@ FutureOr<Response> get(url, {Map<String, String> headers}) =>
65
61
///
66
62
/// For more fine-grained control over the request, use [Request] or
67
63
/// [StreamedRequest] instead.
68
- FutureOr <Response > post (url, body, {Map <String , String > headers,
64
+ Future <Response > post (url, body, {Map <String , String > headers,
69
65
Encoding encoding}) =>
70
66
_withClient ((client) => client.post (url, body,
71
67
headers: headers, encoding: encoding));
@@ -89,7 +85,7 @@ FutureOr<Response> post(url, body, {Map<String, String> headers,
89
85
///
90
86
/// For more fine-grained control over the request, use [Request] or
91
87
/// [StreamedRequest] instead.
92
- FutureOr <Response > put (url, body, {Map <String , String > headers,
88
+ Future <Response > put (url, body, {Map <String , String > headers,
93
89
Encoding encoding}) =>
94
90
_withClient ((client) => client.put (url, body,
95
91
headers: headers, encoding: encoding));
@@ -113,7 +109,7 @@ FutureOr<Response> put(url, body, {Map<String, String> headers,
113
109
///
114
110
/// For more fine-grained control over the request, use [Request] or
115
111
/// [StreamedRequest] instead.
116
- FutureOr <Response > patch (url, body, {Map <String , String > headers,
112
+ Future <Response > patch (url, body, {Map <String , String > headers,
117
113
Encoding encoding}) =>
118
114
_withClient ((client) => client.patch (url, body,
119
115
headers: headers, encoding: encoding));
@@ -126,7 +122,7 @@ FutureOr<Response> patch(url, body, {Map<String, String> headers,
126
122
/// the same server, you should use a single [Client] for all of those requests.
127
123
///
128
124
/// For more fine-grained control over the request, use [Request] instead.
129
- FutureOr <Response > delete (url, {Map <String , String > headers}) =>
125
+ Future <Response > delete (url, {Map <String , String > headers}) =>
130
126
_withClient ((client) => client.delete (url, headers: headers));
131
127
132
128
/// Sends an HTTP GET request with the given headers to the given URL, which can
@@ -142,7 +138,7 @@ FutureOr<Response> delete(url, {Map<String, String> headers}) =>
142
138
///
143
139
/// For more fine-grained control over the request and response, use [Request]
144
140
/// instead.
145
- FutureOr <String > read (url, {Map <String , String > headers}) =>
141
+ Future <String > read (url, {Map <String , String > headers}) =>
146
142
_withClient ((client) => client.read (url, headers: headers));
147
143
148
144
/// Sends an HTTP GET request with the given headers to the given URL, which can
@@ -158,10 +154,10 @@ FutureOr<String> read(url, {Map<String, String> headers}) =>
158
154
///
159
155
/// For more fine-grained control over the request and response, use [Request]
160
156
/// instead.
161
- FutureOr <Uint8List > readBytes (url, {Map <String , String > headers}) =>
157
+ Future <Uint8List > readBytes (url, {Map <String , String > headers}) =>
162
158
_withClient ((client) => client.readBytes (url, headers: headers));
163
159
164
- FutureOr <T > _withClient <T >(FutureOr <T > fn (Client client)) async {
160
+ Future <T > _withClient <T >(FutureOr <T > fn (Client client)) async {
165
161
var client = new Client ();
166
162
try {
167
163
return await fn (client);
0 commit comments