-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Easy configuration of global
NetworkSession
timeouts & more `URLSes…
…sionConfiguration` convenience Fixes #1 ### NetworkRequestFactory configuratoin `NetworkRequestSession.init` now accepts an `eventSession` parameter that is used solely when creating requests for `EventSource` & `EventPublusher` instances.. The parameter defaults to `nil` in which case it is coped from the standard `session` parameter. When copying the regular session it uses the new `URLSessionConfiguration.events()` convenience factory (see below). ### URLSessionConfiguration for “events” Since Server-Sent Event requests have special requirements (e.g. long timeouts) a convenience extension factory method `events()` has been added. It creates a configuration sutiable for SSE streams. ### Global defaults All of the defaults used by the `URLSessionConfiguration` extension factoires (both `rest()` and `events()`) now have configurable default values for easy global configuration.
- Loading branch information
Showing
4 changed files
with
51 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters