         
         return dataTask
     }
+
+    ///Utility method to print response and error objects for debugging purposes
+    private func printResult(response:NSHTTPURLResponse?, error:NSError?) {
+        if let response = response {
+            print("httpDataTask response: \(response)")
+        }
+
+        if let error = error {
+            print("httpDataTask error: \(error.localizedDescription)")
+        }
+    }
 }
    {
        func dataTaskFailureHandler(response:NSHTTPURLResponse?, error:NSError?) {
            #if DEBUG
            if let response = response {
                print("httpDataTask response: \(response)")
            }

            if let error = error {
                print("httpDataTask error: \(error.localizedDescription)")
            }
            #endif
            failure(response, error)
        }

    //MARK: - POST

    /**
     Perform POST request and expect JSON result in response.
     
     - note: It is guaranteed that exactly one of the success or failure closures will be invoked after this method is called regardless of whether a valid NSURLSessionDataTask is returned.
     
     - parameters:
        - url: The url of the request
        - success: A closure to be called on success. The NSURLResponse and a JSON object may be included.
        - failure: A closure to be called on failure. The NSURLResponse and an error may be included.
     - returns: NSURLSessionDataTask already resumed
     */
    
