title: Calling an internal API from within Express
body: <p>I have a simple API route set up in Express (consumed mainly via my Angular frontend):</p>
  
  <pre><code> app.post('/api/sendEmail', emailApi.sendEmail);
  </code></pre>
  
  <p>I've made a module that sits in my backend and also needs to call this service. I figured the easiest way was to do a POST request:</p>
  
  <pre><code>  request({
      url: '/api/sendEmail',
      method: 'POST',
      json: {
        template: template.toLowerCase(),
        obj: mailObj
      }
    }, function(error, response, body){
      console.log('error', error);
      console.log('response', response);
      console.log('body', body);
    });
  </code></pre>
  
  <p>However, I get this error:</p>
  
  <pre><code> Error: Invalid URI "/api/sendEmail"
  </code></pre>
  
  <p>What am I doing wrong here?</p>