ResponseConfiguration
public struct ResponseConfiguration
Configuration object for the response returned by MockURLProtocol
-
Status code expected in the response - defaults to 200
Declaration
Swift
public var statusCode: Int
-
Data expected in the response
Declaration
Swift
public var data: Data?
-
Delay applied before the response is returned
Declaration
Swift
public var delay: TimeInterval
-
Headers expected in the response
Declaration
Swift
public var headers: [String : String]?
-
HTTP version used to init HTTPURLResponse
Declaration
Swift
public var httpVersion: NetworkingMocker.HTTPVersion
-
URL expected in the response
Declaration
Swift
public var responseURL: URL!
-
Set to false if data needs to equal nil - defaults to true
Declaration
Swift
public var expectsDataResponse: Bool