AWSRequest
public struct AWSRequest
Object encapsulating all the information needed to generate a raw HTTP request to AWS
-
Undocumented
Declaration
Swift
public let region: Region
-
Undocumented
Declaration
Swift
public var url: URL
-
Undocumented
Declaration
Swift
public let serviceProtocol: ServiceProtocol
-
Undocumented
Declaration
Swift
public let operation: String
-
Undocumented
Declaration
Swift
public let httpMethod: String
-
Undocumented
Declaration
Swift
public var httpHeaders: [String : Any]
-
Undocumented
Declaration
Swift
public var body: Body
-
Initialize AWSRequest struct
Declaration
Swift
public init(region: Region = .useast1, url: URL, serviceProtocol: ServiceProtocol, operation: String, httpMethod: String, httpHeaders: [String : Any] = [:], body: Body = .empty)
Parameters
region
Region of AWS server
url
Request URL
serviceProtocol
protocol of service (.json, .xml, .query etc)
operation
Name of AWS operation
httpMethod
HTTP method to use (“GET”, “PUT”, “PUSH” etc)
httpHeaders
HTTP request headers
body
HTTP Request body
-
Add a header value
Declaration
Swift
public mutating func addValue(_ value: String, forHTTPHeaderField field: String)
Parameters
value
value
forHTTPHeaderField
name of header