Apply a single middleware module to an existing connector.
To apply multiple middleware modules while building the connector,
use the applyMiddleware
function instead.
import accessToken from "./myMiddleware"
// base connector with no authentication
const baseConnector = createConnector(...)
// new connector with authentication
const authConnector = baseConnector.apply(accessToken)
params are what you pass to connector for parameter substitution.