Skip to content

Instantly share code, notes, and snippets.

@LukeSmith16
Last active April 8, 2023 23:31
Show Gist options
  • Save LukeSmith16/5d9f3a499f3fd1048ece2c61d5e29857 to your computer and use it in GitHub Desktop.
Save LukeSmith16/5d9f3a499f3fd1048ece2c61d5e29857 to your computer and use it in GitHub Desktop.
let config = URLSessionConfiguration.default
// Wait a total of 120 seconds before giving up starting from when there's an interval of no response data received from the server.
config.timeoutIntervalForRequest = 120 // Default is 60
// Wait a total of 360 seconds before giving up starting from when we start a request.
config.timeoutIntervalForResource = 360 // Default is 7 days
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment