{"id":13396560,"url":"https://github.com/aerogear/aerogear-ios-http","last_synced_at":"2025-10-14T04:18:47.355Z","repository":{"id":19885408,"uuid":"23149824","full_name":"aerogear/aerogear-ios-http","owner":"aerogear","description":"Lightweight lib around NSURLSession to ease HTTP calls","archived":false,"fork":false,"pushed_at":"2018-10-09T08:41:20.000Z","size":459,"stargazers_count":45,"open_issues_count":0,"forks_count":31,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-10-10T21:07:06.503Z","etag":null,"topics":["aerogear","cocoapods","http","swift"],"latest_commit_sha":null,"homepage":"https://aerogear.org/ios/","language":"Swift","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aerogear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":".github/CODE_OF_CONDUCT","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-20T13:35:22.000Z","updated_at":"2024-04-21T15:26:57.000Z","dependencies_parsed_at":"2022-08-20T18:20:38.835Z","dependency_job_id":null,"html_url":"https://github.com/aerogear/aerogear-ios-http","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/aerogear/aerogear-ios-http","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerogear%2Faerogear-ios-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerogear%2Faerogear-ios-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerogear%2Faerogear-ios-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerogear%2Faerogear-ios-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aerogear","download_url":"https://codeload.github.com/aerogear/aerogear-ios-http/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerogear%2Faerogear-ios-http/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017949,"owners_count":26086213,"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-10-14T02:00:06.444Z","response_time":60,"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":["aerogear","cocoapods","http","swift"],"created_at":"2024-07-30T18:00:56.876Z","updated_at":"2025-10-14T04:18:47.327Z","avatar_url":"https://github.com/aerogear.png","language":"Swift","funding_links":[],"categories":["HTTP"],"sub_categories":[],"readme":"# AeroGear iOS HTTP\n\n![Maintenance](https://img.shields.io/maintenance/yes/2017.svg)\n[![circle-ci](https://img.shields.io/circleci/project/github/aerogear/aerogear-ios-http/master.svg)](https://circleci.com/gh/aerogear/aerogear-ios-http)\n[![License](https://img.shields.io/badge/-Apache%202.0-blue.svg)](https://opensource.org/s/Apache-2.0)\n[![GitHub release](https://img.shields.io/github/release/aerogear/aerogear-ios-http.svg)](https://github.com/aerogear/aerogear-ios-http/releases)\n[![CocoaPods](https://img.shields.io/cocoapods/v/AeroGearHttp.svg)](https://cocoapods.org/pods/AeroGearHttp)\n[![Platform](https://img.shields.io/cocoapods/p/AeroGearHttp.svg)](https://cocoapods.org/pods/AeroGearHttp)\n\nThin layer to take care of your http requests working with NSURLSession.\n\n|                 | Project Info                                 |\n| --------------- | -------------------------------------------- |\n| License:        | Apache License, Version 2.0                  |\n| Build:          | CocoaPods                                    |\n| Languague:      | Swift 4                                      |\n| Documentation:  | http://aerogear.org/ios/                     |\n| Issue tracker:  | https://issues.jboss.org/browse/AGIOS        |\n| Mailing lists:  | [aerogear-users](http://aerogear-users.1116366.n5.nabble.com/) ([subscribe](https://lists.jboss.org/mailman/listinfo/aerogear-users))                            |\n|                 | [aerogear-dev](http://aerogear-dev.1069024.n5.nabble.com/) ([subscribe](https://lists.jboss.org/mailman/listinfo/aerogear-dev))                              |\n\n- [Features](#features)\n- [Installation](#installation)\n  - [CocoaPods](#cocoapods)\n- [Usage](#usage)\n  - [Request](#request)\n  - [Authentication](#authentication)\n  - [OAuth2 Protocol Support](#oauth2-protocol-support)\n- [Documentation](#documentation)\n- [Demo apps](#demo-apps)\n- [Development](#development)\n- [Questions?](#questions)\n- [Found a bug?](#found-a-bug)\n\n## Features\n\n* Json serializer\n* Multipart upload\n* HTTP Basic/Digest authentication support\n* Pluggable object serialization\n* background processing support\n\n## Installation\n\n### CocoaPods\n\nIn your `Podfile` add:\n\n```bash\npod 'AeroGearHttp'\n```\n\nand then:\n\n```bash\npod install\n```\n\nto install your dependencies\n\n## Usage\n\n### Request\n\nTo perform an HTTP request use the convenient methods found in the Http object. Here is an example usage:\n\n```swift\nlet http = Http(baseURL: \"http://server.com\")\n\nhttp.request(method: .get, path: \"/get\", completionHandler: {(response, error) in\n     // handle response\n})\n\nhttp.request(method: .post, path: \"/post\",  parameters: [\"key\": \"value\"],\n                    completionHandler: {(response, error) in\n     // handle response\n})\n...\n```\n\n### Authentication\n\nThe library also leverages the build-in foundation support for http/digest authentication and exposes a convenient interface by allowing the credential object to be passed on the request. Here is an example:\n\n\u003e **NOTE:**  It is advised that HTTPS should be used when performing authentication of this type\n\n```swift\nlet credential = URLCredential(user: \"john\",\n                                 password: \"pass\",\n                                 persistence: .none)\n\nhttp.request(method: .get, path: \"/protected/endpoint\", credential: credential,\n                                completionHandler: {(response, error) in\n   // handle response\n})\n```\n\nYou can also set a credential per protection space, so it's automatically picked up once http challenge is requested by the server, thus omitting the need to pass the credential on each request. In this case, you must initialize the `Http` object with a custom session configuration object, that has its credentials storage initialized with your credentials:\n\n```swift\n// create a protection space\nlet protectionSpace = URLProtectionSpace(host: \"httpbin.org\",\n                        port: 443,\n                        protocol: NSURLProtectionSpaceHTTP,\n                        realm: \"me@kennethreitz.com\",\n                        authenticationMethod: NSURLAuthenticationMethodHTTPDigest)\n\n// setup credential\n// notice that we use '.ForSession' type otherwise credential storage will discard and\n// won't save it when doing 'credentialStorage.setDefaultCredential' later on\nlet credential = URLCredential(user: \"user\",\n                        password: \"password\",\n                        persistence: .forSession)\n// assign it to credential storage\nlet credentialStorage = URLCredentialStorage.shared\ncredentialStorage.setDefaultCredential(credential, for: protectionSpace);\n\n// set up default configuration and assign credential storage\nlet configuration = URLSessionConfiguration.default\nconfiguration.urlCredentialStorage = credentialStorage\n\n// assign custom configuration to Http\nlet http = Http(baseURL: \"http://httpbin.org\", sessionConfig: configuration)\nhttp.request(method: .get, path: \"/protected/endpoint\", completionHandler: {(response, error) in\n    // handle response\n})\n```\n\n### OAuth2 Protocol Support\n\nTo support the OAuth2 protocol, we have created a separate library [aerogear-ios-oauth2](https://github.com/aerogear/aerogear-ios-oauth2) that can be easily integrated, in order to provide  out-of-the-box support for communicating with OAuth2 protected endpoints. Please have a look at the \"Http and OAuth2Module\" section on our [documentation page](http://aerogear.org/docs/guides/aerogear-ios-2.X/Authorization/) for more information.\n\n## Documentation\n\nFor more details about that please consult [our documentation](http://aerogear.org/ios/).\n\n## Demo apps\n\nTake a look in our demo apps:\n\n* [ChuckNorrisJokes](https://github.com/aerogear/aerogear-ios-cookbook/tree/master/ChuckNorrisJokes)\n* [Weather](https://github.com/aerogear/aerogear-ios-cookbook/tree/master/Weather)\n* [Shoot and Share](https://github.com/aerogear/aerogear-ios-cookbook/tree/master/Shoot)\n\n## Development\n\nIf you would like to help develop AeroGear you can join our [developer's mailing list](https://lists.jboss.org/mailman/listinfo/aerogear-dev), join #aerogear on Freenode, or shout at us on Twitter @aerogears.\n\nAlso takes some time and skim the [contributor guide](http://aerogear.org/docs/guides/Contributing/)\n\n## Questions?\n\nJoin our [user mailing list](https://lists.jboss.org/mailman/listinfo/aerogear-users) for any questions or help! We really hope you enjoy app development with AeroGear!\n\n## Found a bug?\n\nIf you found a bug please create a ticket for us on [Jira](https://issues.jboss.org/browse/AGIOS) with some steps to reproduce it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faerogear%2Faerogear-ios-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faerogear%2Faerogear-ios-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faerogear%2Faerogear-ios-http/lists"}