     //MARK: - Utility
     
     ///Utilty method to create an automatically resumed data task given the input configuration.
-    @discardableResult private func httpDataTask<T:JSON>(with url:URL,
+    @discardableResult private func httpDataTask(with url:URL,
                                                  method:HTTPMethods,
                                                  headers:[String:String]? = nil,
                                                  contentType:HTTPContentType? = nil,
                                                  body:Data? = nil,
-                                                 completion:@escaping (HTTPURLResponse?, T?, Error?) -> Swift.Void) -> URLSessionDataTask?
+                                                 completion:@escaping (Result<Data, JSONSessionErrors>) -> Swift.Void) -> URLSessionDataTask?
     {
         //method to handle internal result of success
         func dataTaskSuccessHandler(request:URLRequest?, data:Data?, response:HTTPURLResponse, error:Error?) {
-            #if DUMP_NETWORK_RESULTS
-                printResult(forRequest: request, data: data, response: response, error: error)
-            #endif
-            
-            let result:T? = T.fromJSON(data ?? Data())
-            completion(response, result, nil)
+            guard let data = data else {
+                completion(.failure(JSONSessionErrors.badHTTPResponse(response)))
+                return
+            }
+
+            completion(.success(data))
         }
         
         //method to handle interal result of failure
         func dataTaskFailureHandler(request:URLRequest?, data:Data?, response:HTTPURLResponse?, error:Error?) {
-            #if DUMP_NETWORK_RESULTS || DEBUG
-                printResult(forRequest: request, data: data, response: response, error: error)
-            #endif
-            
-            if let data = data, error == nil {
-                completion(response, nil, JSONSessionErrors.badHTTPResponse(data))
-            } else {
-                completion(response, nil, error)
+            switch (response, error) {
+            case (.some(let response), .some):
+                completion(.failure(JSONSessionErrors.badHTTPResponse(response)))
+            case (.some(let response), .none):
+                completion(.failure(JSONSessionErrors.badHTTPResponse(response)))
+            case (.none, .some(let error)):
+                completion(.failure(JSONSessionErrors.error(error)))
+            default:
+                completion(.failure(JSONSessionErrors.unknown))
             }
         }
         

public extension URLSession {
    enum JSONSessionErrors: Error {
        case invalidQueryItem(String)
        case badHTTPResponse(Data)
    }
    
    enum HTTPHeaders:String {

     - Parameter completion: A closure to be called on success or failure.
     - returns: NSURLSessionDataTask already resumed
     */
    @discardableResult func httpPost(with url:URL, bodyJSON:JSON? = nil, headers:[String:String]? = nil, completion:@escaping (Result<Data, JSONSessionErrors>) -> Swift.Void) -> URLSessionDataTask?
    {
        let bodyJSONData:Data? = bodyJSON?.toJSON()
        
