Open HeegeePark opened 1 year ago
세션의 타임아웃 값, 쿠키나 캐시 설정 등을 할 수 있음
URLSession.shared() // 기본 요청을 위한 세션, 사용자 정의 불가
URLSession(configuration: .default) // 기본적인 세션, 디스크 기반 캐싱
URLSession(configuration: .ephemral) // 디스크에 어떤 데이터도 저장하지 않고 메모리에 올림, 세션 만료시 관련된 데이터 삭제
URLSession(configuration: .background) // Suspended 상태에서도 업로드 다운로드 가능, 앱이 종료되고 다시시작하면 identifier를 사용해 진행 중이던 전송 상태를 찾을 수 있다.
세션 작업을 나타내는 추상 클래스
URLSession은 네트워크 통신과 관련된 작업들의 그룹을 관리하는 객체
Foundation 프레임워크에 포함되어 있는 클래스이다.
Overview