     }
 
     func getClientAppointmentsPerDay(id: Int, date: NSString) {
-        var request = self.initRequest("GET", url: NSURL(string: "\(baseURL)/appointments/?day=\(date)&client=\(id)&ordering=time")!, params: nil)
-        var session = NSURLSession.sharedSession()
-        
+        var request = NSMutableURLRequest(URL: NSURL(string: "\(baseURL)/appointments/?day=\(date)&client=\(id)&ordering=time")!)
+        request.HTTPMethod = "GET"
+        request.addValue("application/json", forHTTPHeaderField: "Content-Type")
+        request.addValue("application/json", forHTTPHeaderField: "Accept")
+        
+        var session = NSURLSession.sharedSession()
         var task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -> Void in
             if self.isRequestValid(response) {
                 var newData : NSDictionary = NSJSONSerialization.JSONObjectWithData(data, options: .MutableContainers, error: nil) as NSDictionary


    func createAppointment(services: NSArray, employee: NSString, client: NSString, date: NSString, theTime: NSString){
        var params = ["day":date, "time": theTime, "services": services, "employee":employee, "client":client] as Dictionary
        var request = self.initRequest("POST", url: NSURL(string: "\(baseURL)/appointments/")!, params: params)
        var session = NSURLSession.sharedSession()
        
        var task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -> Void in
            if self.isRequestValid(response) {
                var strData = NSString(data: data, encoding: NSUTF8StringEncoding)


    func editProfile(userType: NSString, id: Int, nombre: NSString, email: NSString, telefono: NSString, negocio: Int){
        var params = ["email":email, "name":nombre, "phone_number": telefono, "business":negocio] as Dictionary
        
        var request = NSMutableURLRequest(URL: NSURL(string: "\(baseURL)/\(userType)/\(id)/")!)
        request.HTTPMethod = "PUT"
        request.addValue("application/json", forHTTPHeaderField: "Content-Type")
        request.addValue("application/json", forHTTPHeaderField: "Accept")
        request.HTTPBody = NSJSONSerialization.dataWithJSONObject(params, options: nil, error: nil)
        
        var session = NSURLSession.sharedSession()
        var task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -> Void in
            if self.isRequestValid(response) {
                var json = NSJSONSerialization.JSONObjectWithData(data, options: .MutableLeaves, error:nil) as NSDictionary
