             }
             
         }
-        else
-        {
-            #if DEGUG_MODE_NETWORK
-                println(errors!.localizedDescription)
-            #endif
-        }
+        
         jsonReturn = jsonReturn == nil ? NSMutableDictionary() : jsonReturn
         self.setNetworkActivityIndicatorVisible(visibility: false)
         jsonReturn.setObject(mymetype != nil ? mymetype! : "", forKey: KeyResult.MIME_TYPE.rawValue)
         jsonReturn.setObject(urlResponse != nil ? urlResponse! : "", forKey: KeyResult.URL.rawValue)
         jsonReturn.setObject(String(statusCode), forKey: KeyResult.CODE_RESPONSE.rawValue)
         jsonReturn.setObject(errors == nil ? "" : errors!.localizedDescription , forKey: KeyResult.CONNECTION_ERROR.rawValue)
-        #if DEGUG_MODE_NETWORK
-            println(jsonReturn)
-        #endif
         return jsonReturn
     }
     
     
+    /**
+    the function will immediately lanuch in a therad request. Response will be
+    send to the main thread
+    
+    :param: request-> (NSURLRequest)
+    
+    :param: completion-> ((NSDictionary?)-> Void))
+    
+    :returns: Void
+    */
     func launchRequestWithNSURL(request : NSURLRequest,
         completion : ((NSDictionary?)-> Void)) -> Void {
             

            
            
            self.setNetworkActivityIndicatorVisible(visibility: true)
            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
                
                data = NSURLConnection.sendSynchronousRequest(request, returningResponse: &response, error: &errors)
                
                if data != nil {
                    NSOperationQueue.mainQueue().addOperationWithBlock
                        { completion(self.getJsonResponse(data : data?, errors: errors?, response: response?)!) }
                }
                
            }
            
    }
    
    func launchRequest(cache: Bool,
        timeout: NSTimeInterval ,
        method: MethodRequest,

    }
    
    
    
    
    
    internal func connection(connection: NSURLConnection, didFailWithError error: NSError) {
        self.errorDownloading  = error
        self.completionDownloading!(data: nil, totalLengthDownloading: 0, currentLengthDownloaded: 0, error: true);
    }
    
    internal func connection(connection: NSURLConnection, didReceiveResponse response: NSURLResponse) {
        self.expectLengthDownloading = response.expectedContentLength
        self.totalLengthDownloaded = 0
        self.totalDataDownloaded = NSMutableData()
    }
    
    internal func connection(connection: NSURLConnection, didReceiveData data: NSData) {
        self.totalDataDownloaded.appendData(data)
        self.totalLengthDownloaded += data.length
        self.completionDownloading!(data: data, totalLengthDownloading: self.expectLengthDownloading, currentLengthDownloaded: self.totalLengthDownloaded, error: false)
    }
    
    
