title: How to test a call to a REST service
body: <p>I set up a server that provides several endpoints to clients, and I have a client that uses <code>node-rest-client</code> package to <code>post</code> data to the backend.</p>
  
  <p>I would like to write some unit-testing for the client side, making sure the data is properly sent to the endpoint.</p>
  
  <p>I've been thinking of setting a dummy server for the testing, but that doesn't feel right.</p>
  
  <p>How can i acheive such tests? </p>
  
  <p>Please let me know if there's any missing data.</p>
  
  <p>Thanks in advance!</p>
  
  <h2>EDIT</h2>
  
  <p>I've been looking at <code>supertest</code> package, but it looks like this is used to test the REST API service itself and not to test the REST calls from the client</p>