title: POST in AFNetworking with Swift 2
body: <p>i had this piece of code that is used in my app to log in. It used to work in swift 1, but when i brought the whole app to swift it stopped working. NOTE: The code compiles without errors, the problem is that it doesn't execute the request</p>
  
  <pre><code>@IBAction func signIn(sender: AnyObject) {
          let body = NetUtils.buildLoginRequestBody(email: emailField.text!, password: passwordField.text!);
          let manager = AFHTTPRequestOperationManager();
          manager.requestSerializer = AFJSONRequestSerializer() as AFHTTPRequestSerializer;
          manager.responseSerializer = AFJSONResponseSerializer();
  
          barActivityIndicator.startAnimating();
          setViewsEnabled(false);
  
          manager.POST(LoginURL, parameters: body,
              success: { (operation: AFHTTPRequestOperation!, responseObject: AnyObject!) in
                  NSLog("success code: %d", operation.response!.statusCode);
                  print(JSON(responseObject))
                  self.processUserData(JSON(responseObject));
                  self.barActivityIndicator.stopAnimating();
                  self.setViewsEnabled(true);
  
              },
              failure: { (operation: AFHTTPRequestOperation?, error: NSError!) in
                  NSLog("error: %@", error.localizedDescription);
                  self.barActivityIndicator.stopAnimating();
                  self.setViewsEnabled(true);
                  self.alert.show();
              }
          );
  }
  </code></pre>