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
RequestParameterscollection.Declaration
Swift
public func value(for key: String, in location: RequestParameterLocation? = nil) -> String?Parameters
keyThe key to search for.
locationThe 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
locationThe parameter location to filter by.
Return Value
A subset of
RequestParameters 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
locationThe parameter location to filter by.
Return Value
A
Dictionaryrepresentation of the subset ofRequestParameters for a the specified location.
-
Declaration
Swift
public mutating func next() -> RequestParameter?
View on GitHub
RequestParameters Structure Reference