{"id":1669,"url":"https://github.com/borchero/Squid","last_synced_at":"2025-08-02T04:32:10.030Z","repository":{"id":35161493,"uuid":"215018471","full_name":"borchero/Squid","owner":"borchero","description":"Declarative and Reactive Networking for Swift.","archived":true,"fork":false,"pushed_at":"2022-03-21T13:21:57.000Z","size":2318,"stargazers_count":71,"open_issues_count":9,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-27T10:18:40.240Z","etag":null,"topics":["combine","declarative","http","networking","pagination","reactive","retrying","swift","urlsession","websockets"],"latest_commit_sha":null,"homepage":"https://squid.borchero.com","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/borchero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-14T10:49:50.000Z","updated_at":"2024-03-08T21:33:27.000Z","dependencies_parsed_at":"2022-07-24T18:17:29.781Z","dependency_job_id":null,"html_url":"https://github.com/borchero/Squid","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/borchero/Squid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borchero%2FSquid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borchero%2FSquid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borchero%2FSquid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borchero%2FSquid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/borchero","download_url":"https://codeload.github.com/borchero/Squid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borchero%2FSquid/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268282673,"owners_count":24225166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["combine","declarative","http","networking","pagination","reactive","retrying","swift","urlsession","websockets"],"created_at":"2024-01-05T20:15:52.868Z","updated_at":"2025-08-02T04:32:09.681Z","avatar_url":"https://github.com/borchero.png","language":"Swift","readme":"# Squid\n\n![Cocoapods](https://img.shields.io/cocoapods/v/Squid?label=version)\n![Build](https://github.com/borchero/Squid/workflows/Build/badge.svg?branch=master)\n![CocoaPods](https://github.com/borchero/Squid/workflows/CocoaPods/badge.svg?branch=master)\n![Documentation](https://github.com/borchero/Squid/workflows/Documentation/badge.svg?branch=master)\n\nSquid is a declarative and reactive networking library for Swift. Developed for Swift 5, it aims to make use of the latest language features. The framework's ultimate goal is to enable easy networking that makes it easy to write well-maintainable code.\n\nIn its very core, it is built on top of Apple's [Combine](https://developer.apple.com/documentation/combine/) framework and uses Apple's builtin [URL loading system](https://developer.apple.com/documentation/foundation/url_loading_system) for networking.\n\n## Features\n\nAt the moment, the most important features of Squid can be summarized as follows:\n\n* Sending HTTP requests and receiving server responses.\n* Retrying HTTP requests with a wide range of retriers.\n* Automated requesting of new pages for paginated HTTP requests.\n* Sending and receiving messages over WebSockets.\n* Abstraction of API endpoints and security mechanisms for a set of requests.\n\n## Quickstart\n\nWhen first using Squid, you might want to try out requests against a [Test API](https://jsonplaceholder.typicode.com/).\n\nTo perform a sample request at this API, we first define an API to manage its endpoint:\n\n```swift\nstruct MyApi: HttpService {\n\n    var apiUrl: UrlConvertible {\n        \"jsonplaceholder.typicode.com\"\n    }\n}\n```\n\nAfterwards, we can define the request itself:\n\n```swift\nstruct Todo: Decodable {\n\n    let userId: Int\n    let id: Int\n    let title: String\n    let completed: Bool\n}\n\nstruct TodoRequest: JsonRequest {\n\n    typealias Result = Todo\n    \n    let id: Int\n    \n    var routes: HttpRoute {\n        [\"todos\", id]\n    }\n}\n```\n\nAnd schedule the request as follows:\n\n```swift\nlet api = MyApi()\nlet request = TodoRequest(id: 1)\n\n// The following request will be scheduled to `https://jsonplaceholder.typicode.com/todos/1`\nrequest.schedule(with: api).ignoreError().sink { todo in \n    // work with `todo` here\n}\n```\n\n## Installation\n\nSquid is available via the [Swift Package Manager](https://swift.org/package-manager/) as well as [CocoaPods](https://cocoapods.org).\n\n### Swift Package Manager\n\nUsing the Swift Package Manager is the simplest option to use Squid. In Xcode, simply go to `File \u003e Swift Packages \u003e Add Package Dependency...` and add this repository.\n\nIf you are developing a Swift package, adding Squid as a dependency is as easy as adding it to the dependencies of your `Package.swift` like so:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/borchero/Squid.git\")\n]\n```\n\n### CocoaPods\n\nIf you are still using CocoaPods or are required to use it due to other dependencies that are not yet available for the Swift Package Manager, you can include the following line in your Podfile to use the latest version of Squid:\n\n```ruby\npod 'Squid'\n```\n\n## Documentation\n\nDocumentation is available [here](https://squid.borchero.com) and provides both comprehensive documentation of the library's public interface as well as a series of guides teaching you how to use Squid to great effect. Expect more guides to be added shortly.\n\n## License\n\nSquid is licensed under the [MIT License](https://github.com/borchero/Squid/blob/master/LICENSE).\n","funding_links":[],"categories":["Networking"],"sub_categories":["Video"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborchero%2FSquid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborchero%2FSquid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborchero%2FSquid/lists"}