     }
     
     func fetchShows() -> SignalProducer<Show, NSError> {
-        let request = NSMutableURLRequest(URL:  NSURL(string: "https://api.betaseries.com/members/infos")!)
-        request.setValue(key, forHTTPHeaderField: "X-BetaSeries-Key")
-        request.setValue("2.4", forHTTPHeaderField: "X-BetaSeries-Version")
-        request.setValue(token, forHTTPHeaderField: "X-BetaSeries-Token")
-        
-        return session.rac_dataWithRequest(request)
-            .map({ data, response in
-                return JSON(data: data)
-            })
+        return sendRequestToPath("members/infos", params: nil, method: "GET")
             .flatMap(FlattenStrategy.Latest) { (payload) -> SignalProducer<Show, NSError> in
                 return SignalProducer<Show, NSError> { sink, disposable in
                     print(payload)

            }
    }
    
    func sendRequestToPath(path: String, params: [String: String], method: String) -> SignalProducer<JSON, NSError> {
        let base = "https://api.betaseries.com/\(path)"
        
        let exhangeComponents = NSURLComponents(string: base)!
        exhangeComponents.queryItems = []
        
        for (key, value) in params {
            exhangeComponents.queryItems?.append(NSURLQueryItem(name: key, value: value))
        }
        
        let request = NSMutableURLRequest(URL: exhangeComponents.URL!)

                .map({ (payload) -> String in
                    return payload["token"].stringValue
                })
                .flatMap(.Latest, transform: { (token) -> SignalProducer<Show, NSError> in
                    self.token = token
                    return self.fetchShows()
                })
                .startWithNext({ (show) -> () in
                    return "Show: \(show.name)"
                })
        } catch {
            print("Got error while handling url \(url) : \(error)")
