Created
February 25, 2019 20:45
-
-
Save chamook/b793d64db5558dd4dcea24d922bada71 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://localhost:5000/my-colours")! | |
var request = URLRequest(url: url) | |
request.setValue("application/vnd.chamook.mini-colours+json", forHTTPHeaderField: "Accept") | |
URLSession.shared.dataTask(with: request) { [weak self] (data, response, error) in | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment