StreamUploadable
public protocol StreamUploadable : Uploadable
Represents a StreamUploadable
for Alamofire.
Create custom StreamUploadable
protocol HTTPBinUploadService: StreamUploadable {
typealias Response = Data
var path: String? = "post"
var stream: InputStream = InputStream(url: FileManager.imageURL)!
}
-
The stream.
Declaration
Swift
var stream: InputStream { get }
-
asRequest(parametersType:)
Extension methodCreates a
UploadRequest
to retrieve the contents of a URL based on the specifiedRequestable
Declaration
Swift
func asRequest<T: Encodable>( parametersType: ParametersType<T> ) throws -> () -> UploadRequest
Return Value
The created
UploadRequest
.