Swift-SRWebClient
Swift-SRWebClient copied to clipboard
A super simple http client library for iOS and OSX in Swift
I'm a JS developer new to swift cannot find any library that simply uploads the audio files with paramerts. In js it's simple as bellow: ``` const uploadMedia = (...
Stackoverflow told me that "Under the target's Build Settings. Select No Enforcement for Exclusive Access to Memory from Swift Compiler - Code Generation". But it still failed. Could someone help...
Hi there, Do you plan to support the ability to get progress on a download or upload so someone can hook it up to a UIProgressView? Thanks,
Updated code to work on Swift 2.1.1
For test in development, sometimes we have a server without trusted certificates.
public func uploadImage(urlString:String, imageFile:UIImage, handler:(responseObject:AnyObject? , success: Bool?)-> Void) { let imageData:NSData = UIImageJPEGRepresentation(imageFile, 1.0) SRWebClient.POST(urlString) .data(imageData, fieldName:"image", data:["apiKey":apiKey,"folder":folderName,"tags":tagNames]) .send({(response:AnyObject!, status:Int) -> Void in println(status) println(response) handler(responseObject: response, success: true)...