【发布时间】:2020-05-07 23:10:23
【问题描述】:
我正在尝试通过 observable 请求后端的布尔值,但我无法到达那里,不知道什么是最佳选择 .map .subscribe
return this.http.put({url}, credentials, this.requestOptions)
.catch((error: any) => Observable.throw(error.message)).map((res...
调用的是一个返回布尔值的 api
@PutMapping("/url")
public Boolean api(@RequestBody Credentials credentials)
如何在 typescript 中获取该布尔值?
【问题讨论】:
-
你订阅 observable 了吗?
标签: java angular typescript spring-boot observable