Configuration

public struct Configuration

A Configuration for RESTful Services. You must provide a host.

var configuration = Configuration()
configuration.scheme: String = "https"
configuration.baseURL = "www.mocky.io"
configuration.version = "v2"
configuration.headers = ["Content-Type": "application/json"]
  • The default configuration.

    Declaration

    Swift

    public static var `default`: Configuration
  • The scheme. https by default.

    Declaration

    Swift

    public var scheme: String
  • The host. nil by default.

    Declaration

    Swift

    public var host: String!
  • The version. nil by default.

    Declaration

    Swift

    public var version: String?
  • The url request parameters. nil by default.

    Declaration

    Swift

    public var queryParameters: [String : Any]?
  • The HTTP Method. .GET by default.

    Declaration

    Swift

    public var method: HTTPMethod
  • The request parameter encoding. .JSON by default.

    Declaration

    Swift

    public var encoding: ParameterEncoding
  • The request parameter encoder. .JSON by default.

    Declaration

    Swift

    public var parameterEncoder: ParameterEncoder
  • The HTTP headers. nil by default.

    Declaration

    Swift

    public var headers: HTTPHeaders
  • The request delegates. empty by default.

    Declaration

    Swift

    public var requestDelegates: [RequestDelegate]
  • The request operation queue priority. normal by default.

    Declaration

    Swift

    public var operationQueuePriority: Operation.QueuePriority
  • The request operation quality of service. default by default.

    Declaration

    Swift

    public var operationQualityOfService: QualityOfService
  • Configuration Intializer

    Declaration

    Swift

    public init()

    Return Value

    new Configuration object