{"id":1670,"url":"https://github.com/kean/Get","last_synced_at":"2025-08-02T04:32:17.884Z","repository":{"id":37440589,"uuid":"429913824","full_name":"kean/Get","owner":"kean","description":"Web API client built using async/await","archived":false,"fork":false,"pushed_at":"2024-04-25T19:45:58.000Z","size":2805,"stargazers_count":897,"open_issues_count":3,"forks_count":71,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-05-02T16:18:39.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/kean.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"kean","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-11-19T19:35:32.000Z","updated_at":"2024-06-18T19:45:00.446Z","dependencies_parsed_at":"2022-07-14T08:09:02.636Z","dependency_job_id":"5aabbc28-0f76-4c65-96c1-dadc9dd10a43","html_url":"https://github.com/kean/Get","commit_stats":{"total_commits":308,"total_committers":23,"mean_commits":"13.391304347826088","dds":"0.13311688311688308","last_synced_commit":"c498eff0f097c41319afaba712e39d323d9f9b54"},"previous_names":["kean/apiclient"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kean%2FGet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kean%2FGet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kean%2FGet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kean%2FGet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kean","download_url":"https://codeload.github.com/kean/Get/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228312154,"owners_count":17900216,"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","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":[],"created_at":"2024-01-05T20:15:52.892Z","updated_at":"2024-12-06T08:31:25.988Z","avatar_url":"https://github.com/kean.png","language":"Swift","funding_links":["https://github.com/sponsors/kean"],"categories":["Networking","Swift"],"sub_categories":["Video"],"readme":"\u003cbr\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/1567433/147299567-234fc104-b5ee-40b0-aa75-98f7256f1389.png\" width=\"100px\"\u003e\n\n\n# Get\n\n[![Platform](https://img.shields.io/badge/Platforms-iOS%20%7C%20macOS%20%7C%20watchOS%20%7C%20tvOS%20%7C%20Linux-4E4E4E.svg?colorA=28a745)](#installation)\n\nA lean Swift web API client built using async/await.\n\nGet provides a clear and convenient API for modeling network requests using `Request\u003cResponse\u003e` type. And its `APIClient` makes it easy to execute these requests and decode the responses.\n\n```swift\n// Create a client\nlet client = APIClient(baseURL: URL(string: \"https://api.github.com\"))\n\n// Start sending requests\nlet user: User = try await client.send(Request(path: \"/user\")).value\n\nvar request = Request(path: \"/user/emails\", method: .post, body: [\"alex@me.com\"])\ntry await client.send(request)\n```\n\nThe client uses `URLSession` for networking and provides complete access to all its APIs. It is designed with the \"less is more\" idea in mind and doesn't introduce any unnecessary abstractions on top of native APIs.\n\n```swift\n// In addition to `APIClientDelegate`, you can also override any methods\n// from `URLSessionDelegate` family of APIs.\nlet client = APIClient(baseURL: URL(string: \"https://api.github.com\")) {\n    $0.sessionDelegate = ...\n}\n\n// You can also provide task-specific delegates and easily change any of\n// the `URLRequest` properties before the request is sent.\nlet delegate: URLSessionDataDelegate = ...\nlet response = try await client.send(Paths.user.get, delegate: delegate) {\n    $0.cachePolicy = .reloadIgnoringLocalCacheData\n}\n```\n\nIn addition to sending quick requests, it also supports downloading data to a file, uploading from a file, authentication, auto-retries, logging, and more. It's a kind of code that you would typically write on top of `URLSession` if you were using it directly.\n\n## Sponsor 💖\n\n[Support](https://github.com/sponsors/kean) Get on GitHub Sponsors.\n\n## Documentation\n\nLearn how to use Get by going through the [documentation](https://kean-docs.github.io/get/documentation/get/) created using DocC.\n\nTo learn more about `URLSession`, see [URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system).\n\n## Integrations\n\n### Pulse\n\nYou can easily add logging to your API client using [Pulse](https://github.com/kean/Pulse). It requests a single line to setup.\n\n```swift\nlet client = APIClient(baseURL: URL(string: \"https://api.github.com\")) {\n    $0.sessionDelegate = PulseCore.URLSessionProxyDelegate()\n}\n```\n\nWith Pulse, you can inspect logs directly on your device – and it supports _all_ Apple platforms. And you can share the logs at any time and view them on a big screen using [Pulse Pro](https://kean.blog/pulse/pro).\n\n\u003cimg width=\"2100\" alt=\"pulse-preview\" src=\"https://user-images.githubusercontent.com/1567433/177911236-541117b8-11aa-4a31-9343-733e55a5abe8.png\"\u003e\n\n### CreateAPI\n\nWith [CreateAPI](https://github.com/kean/CreateAPI), you can take your backend OpenAPI spec, and generate all of the response entities and even requests for Get `APIClient`.\n\n```swift\ngenerate api.github.yaml --output ./OctoKit --module \"OctoKit\"\n```\n\n\u003e Check out [App Store Connect Swift SDK](https://github.com/AvdLee/appstoreconnect-swift-sdk) that uses [CreateAPI](https://github.com/kean/CreateAPI) for code generation.\n\n### Other Extensions\n\nGet is a lean framework with a lot of flexibility and customization points. It makes it very easy to learn and use, but you'll need to install additional modules for certain features.\n\n- [Mocker](https://github.com/WeTransfer/Mocker) – mocking network requests for testing purposes\n- [URLQueryEncoder](https://github.com/CreateAPI/URLQueryEncoder) – URL query encoder with `Codable` support\n- [MultipartFormDataKit](https://github.com/Kuniwak/MultipartFormDataKit) – adds support for `multipart/form-data`\n- [NaiveDate](https://github.com/CreateAPI/NaiveDate) – working with dates without timezones\n\n## Minimum Requirements\n\n| Get  | Date         | Swift | Xcode | Platforms                                            |\n|------|--------------|-------|-------|------------------------------------------------------|\n| 2.2  | Apr 13, 2024 | 5.8   | 14.3  | iOS 13.0, watchOS 6.0, macOS 10.15, tvOS 13.0, Linux |\n| 2.0  | Jul 26, 2022 | 5.5   | 13.3  | iOS 13.0, watchOS 6.0, macOS 10.15, tvOS 13.0, Linux |\n\n## License\n\nGet is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkean%2FGet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkean%2FGet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkean%2FGet/lists"}