📜  如何将 http 请求转换为对象 angualr - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:25.890000             🧑  作者: Mango

代码示例1
export class SomeService {
    constructor(private http: HttpClient) {}  // <--- NOTE: HttpClient instead of Http

    getSome(): Observable {
        return this.http.get('myUrl');
    }
}