Validation

public struct Validation

A Validation for RESTful Services.

var validation = Validation()
validation.acceptableStatusCodes = Array(200..<300)
validation.acceptableContentTypes = ["application/json"]
  • The default validation.

    Declaration

    Swift

    public static var `default`: Validation
  • The acceptable status codes. nil by default.

    Declaration

    Swift

    public var acceptableStatusCodes: [Int]?
  • The acceptable content types. nil by default.

    Declaration

    Swift

    public var acceptableContentTypes: [String]?
  • The Data Validation Block.

    Declaration

    Swift

    public var dataValidation: DataRequest.Validation?
  • The Download Validation Block.

    Declaration

    Swift

    public var downloadValidation: DownloadRequest.Validation?
  • The Upload Validation Block.

    Declaration

    Swift

    public var uploadValidation: DataRequest.Validation?
  • Validation Intializer

    Declaration

    Swift

    public init()

    Return Value

    new Validation object