      - Parameter completion: A closure to be called on success or failure.
      - returns: NSURLSessionDataTask already resumed
      */
-    @discardableResult func httpPost<T:JSON>(with url:URL, bodyJSON:JSON? = nil, headers:[String:String]? = nil, completion:@escaping (HTTPURLResponse?, T?, Error?) -> Swift.Void) -> URLSessionDataTask?
+    @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()
         

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

        
        //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
