title: How to use feathersjs client for both websocket and restful connection?
body: <p>I have configured both primus and restful service on my feathersjs server. Below is the configuration code. </p>
  
  <pre><code>app
    .use(compress())
    .options('*', cors())
    .use(cors())
    .use('/', serveStatic(app.get('public')))
    .use(bodyParser.json())
    .use(bodyParser.urlencoded({extended: true}))
    .configure(hooks())
    .configure(rest())
    .configure(swagger({
      docsPath: '/docs',
      uiIndex: path.join(__dirname, '../public/docs.html'),
      info: {
        title: process.env.npm_package_fullName,
        description: process.env.npm_package_description
      }
    }))
    .configure(primus({
      transformer: 'websockets',
      timeout: false
    }, (primus) =&gt; {
      primus.library();
      primus.save(path.join(__dirname, '../public/dist/primus.js'));
    }))
  </code></pre>
  
  <p>On client side, below is the code to use Primus as the connection method which is websocket in this case. How can I use restful on client side in this case? The service methods defined in feathersjs are same for websocket and restful. How can I make a specific restful call instead of websocket?</p>
  
  <pre><code>const feathers = require('feathers-client');
  const rest = require('feathers-rest/client');
  const Primus = require('../public/dist/primus.js');
  let primus = new Primus('http://localhost:3030');
  let app = feathers()
    .configure(feathers.hooks())
    .configure(feathers.primus(primus));
  </code></pre>
  
  <p>I have read the instruction from <a href="https://docs.feathersjs.com/clients/rest.html" rel="nofollow noreferrer">https://docs.feathersjs.com/clients/rest.html</a> and I know how to request rest or websocket connection separately. I don't know how to combine them into one client side.</p>