RequestBody
public protocol RequestBody
Protocol defining the requirements for parameters used for requests.
-
The string value for the requests “Content-Type” header, this is typically a MIME type that reflects the type of data returned by
encodingData()
, but may also contain other parameters.Declaration
Swift
var contentType: String { get }
-
The actual content of the conforming structure, encoded as data.
Declaration
Swift
func encodedData() throws -> Data