     internal func fetchOne<Object: Decodable where Object.DecodedType == Object>(endpoint: Endpoint) -> SignalProducer<Object, Error> {
         return NSURLSession
             .sharedSession()
-            .rac_dataWithRequest(NSURLRequest.create(server, endpoint))
+            .rac_dataWithRequest(NSURLRequest.create(server, endpoint, credentials))
             .mapError(Error.NetworkError)
             .flatMap(.Concat) { data, response -> SignalProducer<Object, Error> in
                 let response = response as! NSHTTPURLResponse

    /// The Server that the Client connects to.
    public let server: Server
    
    /// Create an unauthenticated client for the given Server.
    public init(_ server: Server) {
        self.server = server
    }
    
    /// Fetch the release corresponding to the given tag in the given repository.

}

extension NSURLRequest {
    internal static func create(server: Server, _ endpoint: Client.Endpoint, _ credentials: Client.Credentials?) -> NSURLRequest {
        let URL = NSURL(string: server.endpoint)!.URLByAppendingPathComponent(endpoint.path)
        let request = NSMutableURLRequest(URL: URL)
        
        if let credentials = credentials {
            request.setValue(credentials.authorizationHeader, forHTTPHeaderField: "Authorization")
        }
        
        return request
    }
}

