public class ABSDKHTTPNetworkTransport : NetworkTransport
A network transport that uses HTTP POST requests to send GraphQL operations to a server, and that uses
URLSession as the networking implementation.
Creates a network transport with the specified server URL and session configuration.
public init(url: URL, configuration: URLSessionConfiguration = URLSessionConfiguration.default, sendOperationIdentifiers: Bool = false, accessKey: String? = nil, accessSecret: String? = nil)
The URL of a GraphQL server to connect to.
A session configuration used to configure the session. Defaults to
Whether to send operation identifiers rather than full operation text, for use with servers that support query persistence. Defaults to false.
Send a GraphQL operation to a server and return a response.
public func send<Operation>(operation: Operation, completionHandler: @escaping (_ response: GraphQLResponse<Operation>?, _ error: Error?) -> Void) -> Cancellable
The operation to send.
A closure to call when a request completes.
The response received from the server, or
nilif an error occurred.
An error that indicates why a request failed, or
nilif the request was succesful.
An object that can be used to cancel an in progress request.