         })
         task.resume()
     }
+}
+

        return "https://api.kuggleland.com/1/"
    }
    
    func getRequest(endpointName: String, token: String, params: Dictionary<String, String>?, getRequestCompletionHandler: (json: AnyObject?, responseError: NSError?) -> Void) {
        self.request("GET", endpointName: endpointName, token: token, params: params, requestCompletionHandler: {json, error -> Void in
            getRequestCompletionHandler(json: json, responseError: error)
        })
    }
    
    func request(methodName : String, endpointName: String, token: String, params: Dictionary<String, String>?, requestCompletionHandler: (json: AnyObject?, responseError: NSError?) -> Void) {
        var err: NSError?
        let currentLocale = NSLocale.currentLocale()
        let localeidentifier: AnyObject? = currentLocale.objectForKey(NSLocaleIdentifier)

        var request = NSMutableURLRequest(URL: NSURL(string: KuggleAPI.baseURL() + endpointName)!)
        var session = NSURLSession.sharedSession()
        request.HTTPMethod = methodName
        if (methodName == "POST") {
            request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
            request.HTTPBody = params.dataUsingEncoding(NSUTF8StringEncoding)
        }
        request.addValue("application/json", forHTTPHeaderField: "Accept")
        request.addValue(localeidentifierstring, forHTTPHeaderField: "Accept-language")
        if (token != "") {
