All Projects → aerogear → Aerogear Ios Http

aerogear / Aerogear Ios Http

Licence: apache-2.0
Lightweight lib around NSURLSession to ease HTTP calls

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Aerogear Ios Http

Avsqldebugger
A Simple Core Data Debugger that will look inside your apps DB
Stars: ✭ 30 (-23.08%)
Mutual labels:  cocoapods
Motion Animator Objc
A Motion Animator creates performant, interruptible iOS animations from motion specs.
Stars: ✭ 33 (-15.38%)
Mutual labels:  cocoapods
Sica
🦌 Simple Interface Core Animation. Run type-safe animation sequencially or parallelly
Stars: ✭ 980 (+2412.82%)
Mutual labels:  cocoapods
Awesome Hyperloop Titanium
A curated list of awesome links to resources around Axway's Hyperloop for Titanium. And more.
Stars: ✭ 30 (-23.08%)
Mutual labels:  cocoapods
Centeredcollectionview
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift
Stars: ✭ 965 (+2374.36%)
Mutual labels:  cocoapods
Rainbowbar
Progress bar with wild animation for notched status bar
Stars: ✭ 34 (-12.82%)
Mutual labels:  cocoapods
Lothar
基于CTMediator的组件化中间件
Stars: ✭ 27 (-30.77%)
Mutual labels:  cocoapods
Swiftysound
SwiftySound is a simple library that lets you play sounds with a single line of code.
Stars: ✭ 995 (+2451.28%)
Mutual labels:  cocoapods
Jiramobilekit
JIRA Mobile Kit a framework for raising bugs within your app including screenshots easily. JIRA Bug Raising written in Swift. iOS JIRA SDK Swift 3-4
Stars: ✭ 33 (-15.38%)
Mutual labels:  cocoapods
Mbprogresshud Bwmextension
Nihility-Ming to MBProgressHUD extension, easy to use.
Stars: ✭ 35 (-10.26%)
Mutual labels:  cocoapods
Ios Category
iOS 工具分类整理
Stars: ✭ 30 (-23.08%)
Mutual labels:  cocoapods
Bfkit Swift
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.
Stars: ✭ 963 (+2369.23%)
Mutual labels:  cocoapods
Mcplayerkit
MCPlayerKit is iOS Player, PlayerCoreType: AVPlayer can use play some video, IJKPlayer type can play video, Live ...
Stars: ✭ 34 (-12.82%)
Mutual labels:  cocoapods
Swiftyonboard
A swifty iOS framework that allows developers to create beautiful onboarding experiences.
Stars: ✭ 952 (+2341.03%)
Mutual labels:  cocoapods
Tangramkit
TangramKit is a powerful iOS UI framework implemented by Swift. It integrates the functions with Android layout,iOS AutoLayout,SizeClass, HTML CSS float and flexbox and bootstrap. So you can use LinearLayout,RelativeLayout,FrameLayout,TableLayout,FlowLayout,FloatLayout,LayoutSizeClass to build your App 自动布局 UIView UITableView UICollectionView
Stars: ✭ 984 (+2423.08%)
Mutual labels:  cocoapods
Ctpanoramaview
A library that displays spherical or cylindrical panoramas with touch or motion based controls.
Stars: ✭ 951 (+2338.46%)
Mutual labels:  cocoapods
Aaviewanimator
AAViewAnimator is a set of animations designed for UIView, UIButton, UIImageView with options in iOS, written in Swift.
Stars: ✭ 33 (-15.38%)
Mutual labels:  cocoapods
Grview
UIView and other UIKit elements with a gradient and other attributes for IOS
Stars: ✭ 39 (+0%)
Mutual labels:  cocoapods
Ftpopovermenu
FTPopOverMenu is a pop over menu for iOS which is maybe the easiest one to use. Supports both portrait and landscape. It can show from any UIView, any UIBarButtonItem and any CGRect.
Stars: ✭ 988 (+2433.33%)
Mutual labels:  cocoapods
Scenekit Bezier Animations
Create animations over Bezier curves of any number of points
Stars: ✭ 35 (-10.26%)
Mutual labels:  cocoapods

AeroGear iOS HTTP

Maintenance circle-ci License GitHub release CocoaPods Platform

Thin layer to take care of your http requests working with NSURLSession.

Project Info
License: Apache License, Version 2.0
Build: CocoaPods
Languague: Swift 4
Documentation: http://aerogear.org/ios/
Issue tracker: https://issues.jboss.org/browse/AGIOS
Mailing lists: aerogear-users (subscribe)
aerogear-dev (subscribe)

Features

  • Json serializer
  • Multipart upload
  • HTTP Basic/Digest authentication support
  • Pluggable object serialization
  • background processing support

Installation

CocoaPods

In your Podfile add:

pod 'AeroGearHttp'

and then:

pod install

to install your dependencies

Usage

Request

To perform an HTTP request use the convenient methods found in the Http object. Here is an example usage:

let http = Http(baseURL: "http://server.com")

http.request(method: .get, path: "/get", completionHandler: {(response, error) in
     // handle response
})

http.request(method: .post, path: "/post",  parameters: ["key": "value"],
                    completionHandler: {(response, error) in
     // handle response
})
...

Authentication

The 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:

NOTE: It is advised that HTTPS should be used when performing authentication of this type

let credential = URLCredential(user: "john",
                                 password: "pass",
                                 persistence: .none)

http.request(method: .get, path: "/protected/endpoint", credential: credential,
                                completionHandler: {(response, error) in
   // handle response
})

You 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:

// create a protection space
let protectionSpace = URLProtectionSpace(host: "httpbin.org",
                        port: 443,
                        protocol: NSURLProtectionSpaceHTTP,
                        realm: "[email protected]",
                        authenticationMethod: NSURLAuthenticationMethodHTTPDigest)

// setup credential
// notice that we use '.ForSession' type otherwise credential storage will discard and
// won't save it when doing 'credentialStorage.setDefaultCredential' later on
let credential = URLCredential(user: "user",
                        password: "password",
                        persistence: .forSession)
// assign it to credential storage
let credentialStorage = URLCredentialStorage.shared
credentialStorage.setDefaultCredential(credential, for: protectionSpace);

// set up default configuration and assign credential storage
let configuration = URLSessionConfiguration.default
configuration.urlCredentialStorage = credentialStorage

// assign custom configuration to Http
let http = Http(baseURL: "http://httpbin.org", sessionConfig: configuration)
http.request(method: .get, path: "/protected/endpoint", completionHandler: {(response, error) in
    // handle response
})

OAuth2 Protocol Support

To support the OAuth2 protocol, we have created a separate library 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 for more information.

Documentation

For more details about that please consult our documentation.

Demo apps

Take a look in our demo apps:

Development

If you would like to help develop AeroGear you can join our developer's mailing list, join #aerogear on Freenode, or shout at us on Twitter @aerogears.

Also takes some time and skim the contributor guide

Questions?

Join our user mailing list for any questions or help! We really hope you enjoy app development with AeroGear!

Found a bug?

If you found a bug please create a ticket for us on Jira with some steps to reproduce it.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].