本文整理匯總了TypeScript中@angular/common/http.HttpClient.delete方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript HttpClient.delete方法的具體用法?TypeScript HttpClient.delete怎麽用?TypeScript HttpClient.delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@angular/common/http.HttpClient
的用法示例。
在下文中一共展示了HttpClient.delete方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: deleteInstResp
// Remove a instituição responsavel
deleteInstResp(idInstResp) {
return this.http
.delete(`${GESAC_API}instituicaoResponsavel/${idInstResp}`)
.map(res => console.log(res)
);
}
示例2: delete
delete(url: string): Observable<any> {
return this.http.delete(this.url(url));
}
示例3: deleteByName
deleteByName(appId: number, cluster: string, namespace: string, name: string): Observable<any> {
return this.http
.delete(`/api/v1/kubernetes/apps/${appId}/secrets/${name}/namespaces/${namespace}/clusters/${cluster}`)
.catch(error => Observable.throw(error));
}
示例4: removeFile
removeFile(fullPath: string): Observable<any> {
return this.http.delete(`/raw/files${fullPath}`);
}
示例5: deleteById
deleteById(name: string, cluster: string): Observable<any> {
return this.http
.delete(`/api/v1/kubernetes/persistentvolumes/${name}/clusters/${cluster}`)
.catch(error => Observable.throw(error));
}
示例6: delete
/**
* Delete an Book by id.
*/
delete(id : any) {
return this.http.delete('/api/books/' + id)
.pipe(catchError(this.handleError));
}
示例7: httpDelete
/**
* Sends a DELETE request to the API server.
*
* @param path Path relative to the API path.
* @param body DELETE payload
* @returns {Observable<Object>} JSON result observable
*/
httpDelete(path: string): Observable<Object> {
return this.handleHttpResult(
this.http.delete(this.config.apiPath(path), this.addJwt()));
}
示例8: deleteBackend
deleteBackend(backendServer: BackendServer) {
return this.http.delete<BackendServer>(`${RCCConfig.API_URL}/backends/${backendServer.id}`).pipe(
map(() => backendServer),
);
}
示例9: removePaymentProvider
removePaymentProvider(backendServer: string, paymentProvider: PaymentProvider) {
const url = `${RCCConfig.getRogerthatApiUrl(backendServer)}/payment/providers/${paymentProvider.id}`;
return this.http.delete<PaymentProvider>(url).pipe(
map(() => paymentProvider),
);
}
示例10: delete
delete(username: string) {
return this.http.delete(`api/user/${username}`);
}