NetworkingProviderConvertible

public protocol NetworkingProviderConvertible

A convenience to turn create the appropriate NetworkingProvider for a variety of networking configuration objects. Used by the Service initializer.

For example, instead of having to do this:

Service(baseURL: "http://foo.bar", networking:
  URLSessionProvider(session:
      URLSession(configuration:
          URLSessionConfiguration.default)))

…you can do this:

Service(baseURL: "http://foo.bar", networking:
  URLSessionConfiguration.default)

Siesta supports conversion of the following types into a networking provider:

  • URLSession
  • URLSessionConfiguration
  • Alamofire.Manager

…and you can add to the list by writing an extension to implement NetworkingProviderConvertible.