RequestParameters
public struct RequestParameters : Sequence, IteratorProtocol
Undocumented
-
Undocumented
Declaration
Swift
public var count: Int { get }
-
Undocumented
Declaration
Swift
public var keys: [RequestStringConvertible] { get }
-
Undocumented
Declaration
Swift
public var headers: HTTPHeaders { get }
-
Undocumented
Declaration
Swift
public init(_ params: ( location: RequestParameterLocation, key: RequestStringConvertible, value: RequestStringConvertible?, encodingStrategy: EncodingStrategy )...)
-
Undocumented
Declaration
Swift
public mutating func add(_ params: ( location: RequestParameterLocation, key: RequestStringConvertible, value: RequestStringConvertible?, encodingStrategy: EncodingStrategy )...)
-
Lookup a value in the
RequestParameters
collection.Declaration
Swift
public func value(for key: String, in location: RequestParameterLocation? = nil) -> String?
Parameters
key
The key to search for.
location
The type of parameters to search. If nil, all parameters are searched.
Return Value
String value, if found, or nil.
-
Returns the subset of parameters for a certain location.
Declaration
Swift
public func values(for location: RequestParameterLocation) -> [RequestParameter]
Parameters
location
The parameter location to filter by.
Return Value
A subset of
RequestParameter
s for the specified location. -
Returns the unordered dictionary representation of parameters for a given location.
Declaration
Swift
public func dict(for location: RequestParameterLocation) -> [String : String]
Parameters
location
The parameter location to filter by.
Return Value
A
Dictionary
representation of the subset ofRequestParameter
s for a the specified location.
-
Declaration
Swift
public mutating func next() -> RequestParameter?