Skip to content

Commit

Permalink
Merge branch 'more-config' of github.com:brianquinlan/http into more-…
Browse files Browse the repository at this point in the history
…config
  • Loading branch information
brianquinlan committed Dec 4, 2023
2 parents 1dd2fd0 + 60d062e commit 20baa84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Future<Map<String, List<String>>> sentHeaders(
Uri(scheme: 'http', host: 'localhost', port: server.port)))
..resume();
while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) {
// Let the event loop run.
await pumpEventQueue();
}

Expand Down
8 changes: 4 additions & 4 deletions pkgs/cupertino_http/lib/src/cupertino_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,11 @@ class URLSessionConfiguration
///
/// See [NSURLSessionConfiguration.HTTPAdditionalHeaders](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411532-httpadditionalheaders)
Map<String, String>? get httpAdditionalHeaders {
if (_nsObject.HTTPAdditionalHeaders == null) {
return null;
if (_nsObject.HTTPAdditionalHeaders case var additionalHeaders?) {
final headers = ncb.NSDictionary.castFrom(additionalHeaders);
return stringDictToMap(headers);
}
final headers = ncb.NSDictionary.castFrom(_nsObject.HTTPAdditionalHeaders!);
return stringDictToMap(headers);
return null;
}

set httpAdditionalHeaders(Map<String, String>? headers) {
Expand Down

0 comments on commit 20baa84

Please sign in to comment.