             NSUserDefaults.standardUserDefaults().synchronize()
         }
     }
-    
-
+
+    func connection(connection: NSURLConnection, didFailWithError error: NSError) {
+        let userInfo: [String: AnyObject] = error.userInfo as [String: AnyObject]
+        let errorKey: AnyObject? = userInfo[NSURLErrorFailingURLStringErrorKey]
+        println("Connection failed! Error - \(error.localizedDescription) \(errorKey)")
+    }
+    
+    func connection(connection: NSURLConnection, didReceiveResponse response: NSURLResponse) {
+        self.receivedData?.length = 0
+    }
+    
+    func connection(connection: NSURLConnection, didReceiveData data: NSData) {
+        self.receivedData?.appendData(data)
+    }
+    
+    func connectionDidFinishLoading(connection: NSURLConnection) {
+        println("JSON sent to Sentry")
+    }
+    
+    internal func sendDictionary(dict: [String: AnyObject]) {
+        var error : NSError? = nil;
+        let JSON = self.encodeJSON(dict)
+        self.sendJSON(JSON)
+    }
+    
     internal func generateUUID() -> String {
         let uuid = NSUUID.UUID().UUIDString
         let res = uuid.stringByReplacingOccurrencesOfString("-", withString: "", options: NSStringCompareOptions.LiteralSearch, range: nil)
         return res
     }
-
+    
     private func prepareDictionaryForMessage(message: String,
         level: RavenLogLevel,
         additionalExtra: [String : AnyObject],

        #endif

    }
    

    
//MARK Messages
    func captureMessage(message : String)
    {
        self.captureMessage(message, level: RavenLogLevel.kRavenLogLevelDebugInfo)

        return client
    }
    
    class func clientWithDSN(DSN: String, extra: [String: AnyObject], tags: [String: String]) -> RavenClient?
    {
        return RavenClient.clientWithDSN(DSN, extra: extra, tags: tags, logger: nil)
    }
    
    class func clientWithDSN(DSN: String, extra: [String: AnyObject]) -> RavenClient?
    {
        return RavenClient.clientWithDSN(DSN, extra: extra, tags: [:])
    }
    
    class func clientWithDSN(DSN: String) -> RavenClient?
    {
        return RavenClient.clientWithDSN(DSN, extra: [:])
    }
    
    func exceptionHandler(exception: NSException) {
        RavenClient.sharedClient()?.captureException(exception, sendNow: false)
    }

    func setDefaultTags() {
        let build: String? = tags["Build version"]
        if (build == nil) {
