我检查了很多文章和答案,但我似乎没有找到模拟HTTP Requests我的方法的正确方法。我想frontend独立于backend. 这是我拥有的方法类型:
private getProfile() {
this.http
.get('go/profile/get', {withCredentials: true})
.subscribe((profile: Profile) => {
this.user.profile = profile;
this.updateLineMsgs();
});
}
Run Code Online (Sandbox Code Playgroud)
有什么建议 ?