Created
July 12, 2021 17:15
-
-
Save atulkhatri/5dfcf14f476474cc2812bac41dba3c36 to your computer and use it in GitHub Desktop.
tvOS Bootcamp Network Manager 2
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
private func createRequest(for url: String) -> URLRequest? { | |
guard let url = URL(string: url) else { return nil } | |
var request = URLRequest(url: url) | |
request.httpMethod = "GET" | |
request.setValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type") | |
return request | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment