Swiftpack.co - google/gtm-session-fetcher as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Google Toolbox for Mac - Session Fetcher
.package(url: "https://github.com/google/gtm-session-fetcher.git", from: "v1.7.0")

Google Toolbox for Mac - Session Fetcher

Project site https://github.com/google/gtm-session-fetcher
Discussion group http://groups.google.com/group/google-toolbox-for-mac

Build Status

GTMSessionFetcher makes it easy for Cocoa applications to perform http operations. The fetcher is implemented as a wrapper on NSURLSession, so its behavior is asynchronous and uses operating-system settings on iOS and Mac OS X.

Features include:

  • Simple to build; only one source/header file pair is required
  • Simple to use: takes just two lines of code to fetch a request
  • Supports upload and download sessions
  • Flexible cookie storage
  • Automatic retry on errors, with exponential backoff
  • Support for generating multipart MIME upload streams
  • Easy, convenient logging of http requests and responses
  • Supports plug-in authentication such as with GTMAppAuth
  • Easily testable; self-mocking
  • Automatic rate limiting when created by the GTMSessionFetcherService factory class
  • Fully independent of other projects


Stars: 168
Last commit: 4 days ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

v1.7.0 Release
6 weeks ago
  • New APIs -[GTMSessionFetcherService addDecorator:] and -removeDecorator:. Allows creators and clients of a GTMSessionFetcherService to create and add decorators to intercept each created fetcher at fetch begin or retry time, and which can be notified when the fetch completes/finishes. These decorators may alter the NSURLRequest for the fetcher, adding HTTP headers or (e.g.) URL query parameters on retry.
  • Cleans up some macro usage made obsolete by prior minimum OS/Xcode version bumps.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics