A URL load request that is independent of protocol or URL scheme.
Declaration
struct URLRequest
Overview
URLRequest encapsulates two essential properties of a load request: the URL to load and the policies used to load it. In addition, for HTTP and HTTPS requests, URLRequest includes the HTTP method (GET, POST, and so on) and the HTTP headers.
URLRequest only represents information about the request. Use other classes, such as URLSession, to send the request to a server. See Fetching Website Data into Memory and Uploading Data to a Website for an introduction to these techniques.
When writing Swift code, favor this structure over the NSURLRequest and NSMutableURLRequest classes.
Certain header fields are reserved; see Reserved HTTP Headers.
developer.apple.com/documentation/foundation/urlrequest
Apple Developer Documentation
developer.apple.com
'Basics > Networking' 카테고리의 다른 글
Structure: URLComponents (0) | 2020.11.08 |
---|---|
Structure: URL (0) | 2020.11.08 |
Preventing Insecure Network Connections (0) | 2020.11.07 |
What is URL? (0) | 2020.11.06 |