Helpfulbox Now Offers Free POS Software for restaurants, kiosk, and any other retails business completely free used windows cashier system or as full blown POS. You will able to print to kitchen, display orders on the kitchen screen, manage inventory, employee, report, customer loyalty offers, employee management, delivery address track and much more, al for free.

 How to make an API (Web service) Call?

Date: Wed-Jun-15-2016-
Response
0

To make API (Web Service ) call in Swift you can do,

var params = [MIN:f8d16d98ad12acdbbe1de647414495ec, MobileType:IOS,format:json,OperatorID:500200000000010025″] as Dictionary // Its the parameters required in the webservice.

var request = NSMutableURLRequest(URL: NSURL(string: kDataURL)) // Here kDataURL is the marco for URL.
var session = NSURLSession.sharedSession()
request.HTTPMethod = POST

var err: NSError?
request.HTTPBody = NSJSONSerialization.dataWithJSONObject(params, options: nil, error: &err)
request.addValue(application/json, forHTTPHeaderField: Content-Type)
request.addValue(application/json, forHTTPHeaderField: Accept)

var task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -> Void in
// println(Response: \(response))
var strData = NSString(data: data, encoding: NSUTF8StringEncoding)
println(Body: \(strData))

var err: NSError?
var json2 = NSJSONSerialization.JSONObjectWithData(strData.dataUsingEncoding(NSUTF8StringEncoding), options: .MutableLeaves, error:&err1 ) as NSDictionary

println(json1\(json2))

.
Date: Wed-Jun-15-2016
Response
What is 1 + 100



Helpfulbox Now Offers Free POS Software

for restaurants, kiosk, and any other retails business completely free. It can be used as windows cashier system or as full blown POS. You will able to print to kitchen, display orders on the kitchen screen, manage inventory, employee, report, customer loyalty offers, employee management, delivery address track and much more, all for free.

Just Updated::