简单地公开基于axios的方法来执行HTTP请求的HttpModule导出HttpService,但也将返回类型转换为Observables。
string,headers:{[x:string]:string}){}constheaders={"Content-Type":"application/x-www-form-urlencoded"};httpService
heroes=>fail('expectedanerror,notheroes'),error=>expect(error.message).toContain('test404error'));}); HttpService