Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- class ViewController: UIViewController {
- override func viewDidLoad() {
- super.viewDidLoad()
- // Do any additional setup after loading the view, typically from a nib.
- let request = NSMutableURLRequest(URL: NSURL(string: "letsjam.imrapid.io/signup_manual")!)
- request.HTTPMethod = "POST"
- let postString = "password=123456789$&username=asaf$"
- request.HTTPBody = postString.dataUsingEncoding(NSUTF8StringEncoding)
- let task = NSURLSession.sharedSession().dataTaskWithRequest(request) { data, response, error in
- print("responseString = \(response)")
- }
- task.resume()
- }
- override func didReceiveMemoryWarning() {
- super.didReceiveMemoryWarning()
- // Dispose of any resources that can be recreated.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement