title: Resolving error 404 when connecting to an API
body: <p>I am creating a web application with angular 6, I would like to connect it to a database.
  So I used wamp: mysql and PHP and this is what my api returns at this address <a href="http://localhost/tests/getAll.php" rel="nofollow noreferrer">http://localhost/tests/getAll.php</a>:</p>
  
  <p><a href="https://i.stack.imgur.com/u77ht.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u77ht.png" alt="enter image description here"></a></p>
  
  <p>I'm trying to connect to it from my app :</p>
  
  <pre><code>    constructor(private http: HttpClient) {}
  
  private log(log: string){
      console.info(log);
  }
  
  private handleError&lt;T&gt;(operation = 'operation', result?: T) {
      return (error: any): Observable&lt;T&gt; =&gt; {
          console.error(error);
          console.log(`${operation} failed: ${error.message}`);
  
          return of(result as T);
      };
  }
  
  getlisteUsers(): user{
      console.info('yess2')
      let data;
       this.http.get("http://localhost/tests/getAll.php").pipe(
          tap(_=&gt; this.log(`chargement de la liste réussit`)),
          catchError(this.handleError(`getlisteMotAApprendre`, [])))
      .subscribe(res =&gt; data = res);
      return data
  }
  </code></pre>
  
  <p>When I call this function 
  I have this error :
  <a href="https://i.stack.imgur.com/R4Bjd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R4Bjd.png" alt="enter image description here"></a></p>
  
  <p>thank you in advance for your help</p>