Skip to content

Commit

Permalink
Swap out session configuration for URLSession
Browse files Browse the repository at this point in the history
  • Loading branch information
designatednerd committed Aug 8, 2019
1 parent a91f7ca commit ebed58e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/Apollo/HTTPNetworkTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,17 @@ public class HTTPNetworkTransport {
///
/// - Parameters:
/// - url: The URL of a GraphQL server to connect to.
/// - configuration: A session configuration used to configure the session. Defaults to `URLSessionConfiguration.default`.
/// - session: The URLSession to use. Defaults to `URLSession.shared`,
/// - sendOperationIdentifiers: Whether to send operation identifiers rather than full operation text, for use with servers that support query persistence. Defaults to false.
/// - useGETForQueries: If query operation should be sent using GET instead of POST. Defaults to false.
/// - delegate: [Optional] A delegate which can conform to any or all of `HTTPNetworkTransportPreflightDelegate`, `HTTPNetworkTransportTaskCompletedDelegate`, and `HTTPNetworkTransportRetryDelegate`. Defaults to nil.
public init(url: URL,
configuration: URLSessionConfiguration = .default,
session: URLSession = .shared,
sendOperationIdentifiers: Bool = false,
useGETForQueries: Bool = false,
delegate: HTTPNetworkTransportDelegate? = nil) {
self.url = url
self.session = URLSession(configuration: configuration)
self.session = session
self.sendOperationIdentifiers = sendOperationIdentifiers
self.useGETForQueries = useGETForQueries
self.delegate = delegate
Expand Down

0 comments on commit ebed58e

Please sign in to comment.