File tree 4 files changed +27
-7
lines changed
4 files changed +27
-7
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.1.1
2
+
3
+ * Add a ` URLSession.sessionDescription ` field.
4
+
1
5
## 0.1.0
2
6
3
7
* Restructure ` package:cupertino_http ` to offer a single ` import ` .
Original file line number Diff line number Diff line change @@ -185,6 +185,13 @@ void testURLSession(URLSession session) {
185
185
server.close ();
186
186
});
187
187
188
+ test ('sessionDescription' , () async {
189
+ session.sessionDescription = null ;
190
+ expect (session.sessionDescription, null );
191
+ session.sessionDescription = 'Happy Days!' ;
192
+ expect (session.sessionDescription, 'Happy Days!' );
193
+ });
194
+
188
195
test ('dataTask' , () async {
189
196
final task = session.dataTaskWithRequest (
190
197
URLRequest .fromUrl (Uri .parse ('http://localhost:${server .port }' )))
Original file line number Diff line number Diff line change @@ -1067,15 +1067,24 @@ class URLSession extends _ObjectHolder<ncb.NSURLSession> {
1067
1067
onFinishedDownloading: onFinishedDownloading,
1068
1068
onComplete: onComplete);
1069
1069
}
1070
- // A **copy** of the configuration for this sesion.
1071
- //
1072
- // See [NSURLSession.configuration](https://developer.apple.com/documentation/foundation/nsurlsession/1411477-configuration)
1070
+
1071
+ /// A **copy** of the configuration for this sesion.
1072
+ ///
1073
+ /// See [NSURLSession.configuration] (https://developer.apple.com/documentation/foundation/nsurlsession/1411477-configuration)
1073
1074
URLSessionConfiguration get configuration => URLSessionConfiguration ._(
1074
1075
ncb.NSURLSessionConfiguration .castFrom (_nsObject.configuration! ));
1075
1076
1076
- // Create a [URLSessionTask] that accesses a server URL.
1077
- //
1078
- // See [NSURLSession dataTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/1410592-datataskwithrequest)
1077
+ /// A description of the session that may be useful for debugging.
1078
+ ///
1079
+ /// See [NSURLSession.sessionDescription] (https://developer.apple.com/documentation/foundation/nsurlsession/1408277-sessiondescription)
1080
+ String ? get sessionDescription =>
1081
+ toStringOrNull (_nsObject.sessionDescription);
1082
+ set sessionDescription (String ? value) =>
1083
+ _nsObject.sessionDescription = value? .toNSString (linkedLibs);
1084
+
1085
+ /// Create a [URLSessionTask] that accesses a server URL.
1086
+ ///
1087
+ /// See [NSURLSession dataTaskWithRequest:] (https://developer.apple.com/documentation/foundation/nsurlsession/1410592-datataskwithrequest)
1079
1088
URLSessionTask dataTaskWithRequest (URLRequest request) {
1080
1089
final task =
1081
1090
URLSessionTask ._(_nsObject.dataTaskWithRequest_ (request._nsObject));
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: cupertino_http
2
2
description : >
3
3
A macOS/iOS Flutter plugin that provides access to the Foundation URL
4
4
Loading System.
5
- version : 0.1.0
5
+ version : 0.1.1
6
6
repository : https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http
7
7
8
8
environment :
You can’t perform that action at this time.
0 commit comments