title: Register internal ionic app path as REST provider
body: <p>For certain reasons I'd like to build an in-app like REST endpoint in my ionic 3 app. Then frontend components should be able to call data from the in-app backend by simple http.request. I.E. like so:</p>
  
  <pre><code>this.http.request("/#/api/local/getUsers", requestOptions).subscribe(
        (rc) =&gt; { console.log(rc.text()); },
        (err) =&gt; { console.log(err) }
      );
  </code></pre>
  
  <p>The result of this request should be a json list of valid users (whatever, determined by the registered controller and request parameters).</p>
  
  <p>I have succeeded to register the path for a component like so:</p>
  
  <pre><code>@IonicPage({
    name: 'api',
    segment: 'local/:method',
  })
  @Component({
    selector: 'page-fgttm',
    templateUrl: 'fgttm.html',
  })
  export class FgttmPage ...
  </code></pre>
  
  <p>And when I navigate to /#/api/local/getUsers I can see the (unfortunately HTML) output like written in fgttm.html.
  But the <code>this.http.request("/#/api/local/getUsers"</code> just recieves the plain index.html template (far away from json but at least a 200).</p>
  
  <p>What am I missing here? Is there a way to bind an ionic-provider to a path (like a controller in angular or drupal)?</p>
  
  <p>EDIT: I have also tried to use ionic-native/deeplinks. Doesn't work. My deeplink routes get called when I click on a link in the device browser like expected. But the routes do not get called when I try to access them via the <code>http.request(myscheme://myurl.com/api</code> etc. from inside the app.</p>
  
  <p>EDIT2: Using an in-app light-httpd server (<code>ionic-native/httpd</code>) is also not an option because testing in Chrome wouldn't be possible.</p>