iOS Newtwork system

URL Load System

URL Loading

✔️ URL Session

사용법

URLSessionTask

URLSessionConfiguration

✔️ URL Request

public init(url: URL, 
cachePolicy: URLRequest.CachePolicy = default, 
timeoutInterval: TimeInterval = default)
var cachePolicy: URLRequest.CachePolicy
var timeoutInterval: TimeInterval
var networkServiceType: URLRequest.NetworkServiceType

var httpMethod: String?
var httpBody: Data?

func addValue(_ value: String, forHTTPHeaderField field: String)
func setValue(_ value: String?, forHTTPHeaderField field: String)