Last active
December 29, 2018 02:56
-
-
Save regularberry/15e44fd3cf6a28aff04a3e6e25b0e2ec to your computer and use it in GitHub Desktop.
This file contains 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) | |
var request = URLRequest(url: url) | |
request.httpBody = data | |
let task = URLSession.shared.dataTask(with: request) { data, response, error in | |
print("We're all done here") | |
} | |
task.resume() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment