angular - 以角度捕获从 REST 返回的字符串。我已经实现了它,但我想知道它是否以正确的方式完成
问题描述
在 Angular Service.ts 中:
changePriority(ticket : TicketDetails) {
return this.http.put("api/serviceEngineer/updatePriority", ticket, {responseType : 'text'})
}
I declared the Http Client in the following way using a constructor:
constructor(private http: HttpClient) { }
通过这种方式,我以角度捕获从 REST 返回的字符串,但我从一位朋友那里知道这不是正确的方法,我想知道究竟是为什么。他是说它永远是活跃的,不像 Observable。任何帮助都将是非常可观的。谢谢!!!
解决方案
推荐阅读
- c# - EmguCV 卡尔曼滤波器给出不稳定的结果
- rx-java2 - 应该配置一个 rx-java 吗?
- javascript - 有没有办法使用 appript 从谷歌表格中提取多行
- python - Delete single column from multiple xlsx sheets using python
- storage - AnyLogic:从存储架中的特定单元中挑选产品
- python - Nan检查不认识Nan
- javascript - Issue while updating the path param in angular 8 at production build
- node.js - 节点中间件在继续之前等待功能完成
- javascript - 如何从具有多个对象的 json 文件创建表?
- ios - 如何修复条件绑定的可选类型不是“Bool”?