      - Parameter completion: A closure to be called on success or failure.
      - returns: NSURLSessionDataTask already resumed
      */
-    @discardableResult func httpPost<T:JSON>(with url:URL, bodyParameters:[URLQueryItem], headers:[String:String]? = nil, completion:@escaping (HTTPURLResponse?, T?, Error?) -> Swift.Void) -> URLSessionDataTask?
+    @discardableResult func httpPost(with url:URL, bodyParameters:[URLQueryItem], headers:[String:String]? = nil, completion:@escaping (Result<Data, JSONSessionErrors>) -> Swift.Void) -> URLSessionDataTask?
     {
         guard let body:String = URLQueryItem.REST_urlEscapedDescription(queryItems: bodyParameters) else {
-            completion(nil, nil, JSONSessionErrors.invalidQueryItem(bodyParameters.description))
+            completion(.failure(JSONSessionErrors.invalidQueryItem(bodyParameters.description)))
             return nil
         }
         

     - Parameter completion: A closure to be called on success or failure.
     - returns: NSURLSessionDataTask already resumed
     */
    @discardableResult func httpGet<T:JSON>(with url:URL, headers:[String:String]? = nil, completion:@escaping (HTTPURLResponse?, T?, Error?) -> Swift.Void) -> URLSessionDataTask?
    {
        return httpDataTask(with: url,
                            method: .get,
                            headers: headers,
                            completion: completion)
    }
    
    //MARK: - Put
    
    /**

        
        //create data task
        let httpDataTask:URLSessionDataTask = dataTask(with: request) { (data, response, error) in
            #if DUMP_NETWORK_RESULTS || DEBUG
            printResult(forRequest: request, data: data, response: response, error: error)
            #endif

            guard let httpResponse:HTTPURLResponse = response as? HTTPURLResponse else {
                dataTaskFailureHandler(request: request as URLRequest, data: data, response:nil, error: error)
                return
