AStreamUploadable
public protocol AStreamUploadable : _AUploadable
Represents a StreamUploadable
for Alamofire.
Create custom StreamUploadable
protocol HTTPBinUploadService: AStreamUploadable {
var path: String? = "post"
var stream: InputStream = InputStream(url: FileManager.imageURL)!
}
-
The stream.
Declaration
Swift
var stream: InputStream { get }
-
request
Extension methodCreates a
UploadRequest
to retrieve the contents of a URL based on the specifiedRequestable
If
startRequestsImmediately
istrue
, the request will haveresume()
called before being returned.Declaration
Swift
public var request: UploadRequest { get }
Return Value
The created
UploadRequest
.