Last active
September 29, 2018 23:49
-
-
Save regularberry/4b384d798247a443f56094b40940da0e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let url = URL(string: "http://0.0.0.0")! | |
| let data = "Secret Message".data(using: .utf8) | |
| let request = URLRequest(url: url) | |
| let config = URLSessionConfiguration.background(withIdentifier: "uniqueId") | |
| let session = URLSession(configuration: config, delegate: nil, delegateQueue: nil) | |
| let task = session.uploadTask(with: request, from: data) { responseData, response, error in | |
| print("We're done here") | |
| } | |
| task.resume() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment