DEVELOPERS TOOLS

Code for SWIFT

import Foundation let request = NSMutableURLRequest(url: NSURL(string: “http://www.solution.mtalkz/SendSMS/sendmsg.php?pass=password&send=SenderId%20as%20required&dest=Destination%20Mobile%20Number&intl=0%20&udhi=0%20&uname=Username&msg=Body%20of%20the%20message&dcs=0%20-%20Text%2C%204%20-%20binary%2C%208%20-Unicode%2C%2016%20%E2%80%93%20Flash%2C%20245%20%E2%80%93%20binary%20including%20Ringtone%20or%20picture&port=Port%20Number%20based%20on%20Handset&wapurl=URL&waptxt=Text%20Message&unicode=0-Plain%2C%201-Unicode&concat=0&prty=1%2C%202%2C%203%2C%204%2C%205&vp=1%20to%20180%20minutes”)! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = “POST” let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume()
import Foundation let headers = ["content-type": "application/javascript"] let request = NSMutableURLRequest(url: NSURL(string: "http://vapi.mtalkz/voiceapi/tapi.php?account=account%20name&pin=password&templateid=unique%20number&retry=number%20of%20retries&sch_time=scheduled%20start%20time&end_time=scheduled%20end%20time")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume()
import Foundation let headers = ["content-type": "application/javascript"] let request = NSMutableURLRequest(url: NSURL(string: "http://vapi.mtalkz/voiceapi/tapi.php?account=account%20name&pin=password&templateid=unique%20number&retry=number%20of%20retries&sch_time=scheduled%20start%20time&end_time=scheduled%20end%20time")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume()