xcode - Microsoft Outlook API and Swift -


how access microsoft outlook api using swift. want use microsoft outlook api allow user search people in outlook server. search framework set up. confused how access server. code consulting people have done before. code have far:

class exchangeapi {  func httpsendrequest(request: nsmutableurlrequest, callback: (string, string?) -> void) {     //implementing core data      var appdel: appdelegate = (uiapplication.sharedapplication().delegate as! appdelegate)     var context: nsmanagedobjectcontext = appdel.managedobjectcontext!     let ent = nsentitydescription.entityforname("emails", inmanagedobjectcontext: context)      var email = emails(entity: ent! , insertintomanagedobjectcontext: context)          let task = nsurlsession.sharedsession().datataskwithrequest(             request,             completionhandler: {                 data, response, error in                 if error != nil {                     callback("", error!.localizeddescription)                 } else {                     callback(                         nsstring(data: data!, encoding: nsutf8stringencoding)! string,                         nil                     )                 }         })          task.resume()     }     func httpget(url: string, callback: (string, string?) -> void) { //implementing core data var appdel: appdelegate = (uiapplication.sharedapplication().delegate as! appdelegate) var context: nsmanagedobjectcontext = appdel.managedobjectcontext! let ent = nsentitydescription.entityforname("emails",inmanagedobjectcontext: context)  var email = emails(entity: ent! , insertintomanagedobjectcontext: context)      var request = nsmutableurlrequest(url: nsurl(string: url)!)     httpsendrequest(request, callback: callback)         request.url = nsurl(string: "https://mail.sap.com/ews/exchange.asmx")         request.httpmethod = "get"  }      } 

take @ ews managed api, ews, , web services in exchange article explains possible options.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -