deleteBlogEntry(id: number): Observable<Response> {
   return this.http.delete('/api/blogs/' + id)
 }
Example #2
0
	deleteJSON(url: string, cb: ServerResponse): void {
		this.http.delete(url)
			.subscribe((res: Response) => {
				cb(res.json());		//callBack		
			});
	} 	//deleteJSON
Example #3
0
 unfavorite(item) {
   return this.http.delete(favoritesURL + item.id).map(res => res.json()).catch(this.handleError);
 }
Example #4
0
 deleteFamily(id) {
     return this._http.delete("/api/products/family/" + id)
         .map(response => response.json());
 }
Example #5
0
 public delete(p:Post) {
     return this._http
         .delete('./api/posts/' + p._id,
                 this._headerService.getJsonHeaders(this._loginService.getToken()))
         .map(res => res.json())
 }
Example #6
0
 deleteAllData(): Observable<any> {
     const token = localStorage.getItem('token') !== null ? '?auth=' + localStorage.getItem('token') : '';        
     return this._http.delete('https://a2-dev.firebaseio.com/users/data.json' + token)
         .map(response => response.json());
 }
Example #7
0
 deleteProduct(id) {
     return this._http.delete("api/products/id/" + id)
         .map(response => response.json());
 }
	deleteStudent(student: Student): Observable<Response> {
		return this.http.delete('http://localhost:8080/api/student/'+student.id);
	}
Example #9
0
    delete(url:string, defaultOptions?: RequestOptions): Observable<Response> {
        let options:RequestOptions = this.manageRequestOptions(defaultOptions);

        return this.http.delete(rootUrl+url, options);
    }
 deleteItem(item: Item) {
   return this.http.delete(`${BASE_URL}${item.id}`)
     .map(res => res.json())
     .toPromise();
 }
Example #11
0
    deleteUser(userId) {
		return this._http.delete('http://jsonplaceholder.typicode.com/users/'+ userId)
			.map(res => res.json());
	}
Example #12
0
 //Borrado de contenido
 removeContenido(contenido: Contenido){
   return this.http.delete(BASE_URL + contenido.id)
   .map(response => undefined)
   .catch(error => this.handleError(error));
 }
Example #13
0
    deleteComment(deletedComment: any) {
        let params = new URLSearchParams();
        params.append('id', '' + deletedComment.id );

        return this.http.delete(this.base_url, {search: params});
    }
Example #14
0
 public delete(url: string, options?: RequestOptionsArgs) {
   return this._http.delete(url, options || this.options);
 }
 deleteFacility(id:number):Observable<any> {
     return this._http.delete(`http://localhost:8000/api/facilities/${id}/`)
         .map(res => {
         });
 }
Example #16
0
    deletePhoto(deletedPhoto: any) {
        let params = new URLSearchParams();
        params.append('id', '' + deletedPhoto.id );

        return this.http.delete(this.base_url, {search: params});
    }
 delete(url:string, options?:RequestOptionsArgs):Observable<Response> {
   return this.http.delete(url, mergeAuthToken(options));
 }
Example #18
0
 deleteItem(item: Item) {
   this.http.delete(`${BASE_URL}${item.id}`)
     .subscribe(action => this.store.dispatch({ type: 'DELETE_ITEM', payload: item }));
 }
 delete(url: string, options?: RequestOptionsArgs): Observable<Response> {
     url = this.buildUrl(url);
     options = this.prepareOptions(options);
     return this._http.delete(url, options);
 }
 removePerson(person: Person){
     return this._http.delete(SERVICE_URL + '/' + person.Id);//.map(res => res.json());
 }
Example #21
0
 deleteCategory(id) {
     return this._http.delete("/api/products/category/" + id)
         .map(response => response.json());
 }
    deleteRecipe(recipe: Recipe) {

        this.http.delete(`/api/recipe/${recipe._id}`)
          .subscribe(action => this.store.dispatch({ type: 'DELETE_RECIPE', payload: recipe }));
    }
 deleteMovie(index,movie){
     return this.http.delete('api/movies/'+movie.id);
 }
Example #24
0
 removeDonor(donor: Donor) {
     var url = config.host + 'api/donors/' + donor._id;
     return this.http.delete(url).map(res=> res.json());
 };
 eliminar(propuesta:Propuesta) {
   return this.http.delete(URL+ propuesta.id)
     .map(response => undefined)
     .catch(error => this.handleError(error));
 }
Example #26
0
 delete(resource: string, id: any) {
     let uri = this.baseURI + resource + "/" + id;;
     return this.http.delete(uri);
 }
Example #27
0
 delete(id: number) {
     return this.http.delete('rest/eleve/lpc/evaluation/' + id);
 }
	deleteAllData(): Observable<any> {
		const token = localStorage.getItem('angular-auth-token') !== null ? '?auth=' + localStorage.getItem('angular-auth-token') : '';
		return this._http.delete('https://crackling-torch-9590.firebaseio.com/users/data.json' + token).map(response => response.json());
	}
Example #29
0
  deleteTodo(id) {

      return this.http.delete(`/api/todo/${id}`)
          .map(res => res.json());
  }
 delete (url: string) {
   let observable: Observable<Object> = this._http.delete(this.baseUrl + url);
   return observable;
 };