Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Commit ae04a79

Browse files
committed
use shared
1 parent 947529f commit ae04a79

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

StudyplusSDK/StudyplusAPIRequest.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,7 @@ internal struct StudyplusAPIRequest {
7878

7979
request.addValue("OAuth " + accessToken, forHTTPHeaderField: "HTTP_AUTHORIZATION")
8080

81-
let urlSession = URLSession(configuration: URLSessionConfiguration.default)
82-
let task = urlSession.dataTask(with: request) { (data, response, error) in
83-
84-
urlSession.finishTasksAndInvalidate()
81+
let task = URLSession.shared.dataTask(with: request) { (data, response, error) in
8582

8683
guard error == nil else {
8784
failure(0, nil)

0 commit comments

Comments
 (0)