title: angular2 http.delete on in-memory-web-api
body: <p>my project uses on premise servers, the backend runs on .NET core and  I develop on a mac, so I cannot run an instance of our backend. Therefore I have made a separate (angular-cli) environment for my project that uses the in-memory-web-api.</p>
  
  <p>I have it set up and works for get/ and get/:id. but a delete won't work. Is there any way to make this work or is it not possible to do it with i-m-w-a ?</p>
  
  <p>The Service</p>
  
  <pre><code>public getOperations(): Observable&lt;IOperation[]&gt;{
      return this.http.get(`${environment.baseUrl}operations/`)
          .map(this.sharedService.extractData)
          .catch(this.sharedService.handleError);
    }
    public getOperation(operationId: string):Observable&lt;IOperation&gt;{
      return this.http.get(`${environment.baseUrl}operations/${operationId}`)
          .map(this.sharedService.extractData)
          .catch(this.sharedService.handleError);
    }
    public deleteOperation(operationId: string): Observable&lt;any&gt;{
      return this.http.delete(`${environment.baseUrl}operations/${operationId}`)
          .map(this.sharedService.extractData)
          .catch(this.sharedService.handleError);
    }
  </code></pre>
  
  <p>The In memory database</p>
  
  <pre><code>export class InMemoryDataService implements InMemoryDbService {
      createDb() {
          let operations: IOperation[] = [
              new Operation({
                  id:'001',
                  name: 'Operation ABC',
                  status:'Active',
                  startDate: new Date().toLocaleDateString()
              }),
              new Operation({
                  id:'002',
                  name: 'Operation DEF',
                  status:'Closed',
                  startDate: new Date().toLocaleDateString(),
                  endDate: new Date().toLocaleDateString()
              }),
              new Operation({
                  id:'003',
                  name: 'Operation GHI',
                  status:'Closed',
                  startDate: new Date().toLocaleDateString(),
                  endDate: new Date().toLocaleDateString()
              }),
              new Operation({
                  id:'004',
                  name: 'Operation JKL',
                  status:'Closed',
                  startDate: new Date().toLocaleDateString(),
                  endDate: new Date().toLocaleDateString()
              }),
          ];
          return {operations};
      }
  }
  </code></pre>
  
  <p>Forgot to add my component method that calls my service method:</p>
  
  <pre><code>public deleteOperation(operation: IOperation){
          this.confirmationService.confirm({
              message: `Are you sure that you want to delete '${operation.name}'?`,
              accept: () =&gt; {
                  this.operationsService.deleteOperation(operation.id)
                      .subscribe(()=&gt;{
                          this.loadOperations();
                      })
              }
          });
      }
  </code></pre>