         
         return r!
     }
-    
-    
-    static func parseJSON(data: NSData) -> [String: AnyObject]? {
-        var json: [String: AnyObject]?
-        
-        do {
-            json = try NSJSONSerialization.JSONObjectWithData(data, options: .AllowFragments) as? [String: AnyObject]
-        } catch _ {}
-        
-        return json
-    }
 }

            handler(WebAPIResult.Failure(.NoRequest))
        }
    }
    
    private static func parseResponse(data: NSData?, response: NSURLResponse?, error: NSError?) -> WebAPIResult<NSData, WebAPIErrors> {
        var r: WebAPIResult<NSData, WebAPIErrors>?
        


import Foundation

/// WebAPI structure.  Mostly a placeholder for the static methods that
/// that the API provides.
struct WebAPI {
    
    /// Method that invokes the required http operation.
    ///
    /// - parameter router: A WebAPIRouter object
    /// - parameter handler: A block that is called when the operation is 
    /// complete.
    static func request(router: WebAPIRouter, handler: (WebAPIResult<NSData, WebAPIErrors>) -> Void) {
        if let request = router.request {
            var task: NSURLSessionTask?
