本文整理汇总了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}`);
}