         self.smsUrl = "\(self.baseUrl)/1/sms/template"
         self.mailUrl = "\(self.baseUrl)/1/mail/template"
 
+        let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
+        configuration.timeoutIntervalForResource = 60
+        self.manager = Alamofire.Manager(configuration: configuration)
         
         self.context = SDContext(instanceId: instanceId, appId: appId)
         

    let mailUrl: String
    
    let context: SDContext
    
    
    public init(instanceId: String, appId: String) {
        self.baseUrl = "https://\(instanceId).spacedog.io"

        var encoding = ParameterEncoding.URL
        if body != nil {encoding = ParameterEncoding.Custom(UTF8JSONEncoding())}
        
        manager.request(method, url, parameters: body, encoding: encoding, headers: headers).responseJSON { response in
            self.handleResponse(response, success: success, error: error)
        }
        
