# Untitled

URLSession

- Request

    - Configuration

        - shared ===> delegation 형태로 응답을 받을 수 없음

        - **default ===> delegation 형태로 응답 받을 수 있음**

        - ephemeral

        - background

    - Task (어떤 요청 처리인지?)

        - data get (json, media ..)

        - upload (formType, content-type ..)

        - download

- Response - 응답을 어떻게 받을거?

    - completion handler - closure

        - success/failure 형태로 응답 상태를 한 번에 확인

        - 한 번에 확인할 수 있기 때문에 큰 용량의 데이터를 얼마나 어떻게 받아오고 있는지 캡쳐하기 쉽지 않다. (⇒ delegation 방식을 사용함)

    - delegation

        - 요청-응답의 상태가 어떤 단계에 있는지 **진행률을** 보여주는 형태

        - URLSessionDataDelegation, URLSessionDelegation 등의 프로토콜을 채용해서 delegate 패턴으로 코드 작성

For the site tree, see the [root Markdown](https://slashpage.com/hankyeol.md).
