Skip to content

BadriVK/WebServiceOperationUsingSwiftBlock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Description

Call web-service operations using Blocks (Swift closures)

NSURLRequest with session (iOS 9 or above)

AVReachability to check network availibility

##Requirements

Swift 2 (Xcode 7+)

iOS 8+

ARC

##Usage

Pass the params dictionary and URL

let params:NSDictionary = ["email":"username" as String!, "pass": "pass" as String!]
 
let webOperation = AVWebOperation()
 
 webOperation.callServiceWithUrl("LOGINURL", param: params, completion: { (result) -> Void in

         let status = result.objectForKey("status")?.boolValue
         if status == true {
             //Handle the response here:
         }
 })

Author

(@badriVishwakarma)

About

Call web-service operations using Swift closures

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages