URLEncodedBody
public struct URLEncodedBody : RequestBody, CustomStringConvertible, ExpressibleByArrayLiteral, ExpressibleByDictionaryLiteral
Parameters that may be encoded as a URL query string, i.e. key=value&otherKey=otherValue
.
This structure can be used all request types. For requests that can take a request body (i.e. POST), the output of
the encodedData()
method is used. In instances where this is not the case, the description
is appended to the
endpoint URL as a query string.
-
Undocumented
Declaration
Swift
public init(queryString: String)
-
Undocumented
Declaration
Swift
public func get(_ name: String) -> String?
-
Undocumented
Declaration
Swift
public mutating func put(name: String, value: CustomStringConvertible?)
-
Declaration
Swift
public var description: String { get }
-
Declaration
Swift
public init(arrayLiteral elements: URLQueryItem...)
-
Declaration
Swift
public init(dictionaryLiteral elements: (String, CustomStringConvertible?)...)
-
Declaration
Swift
public let contentType: String
-
Declaration
Swift
public func encodedData() throws -> Data