Difference Between Http & HttpClient

Difference Between Http & HttpClient


Http:

  1. Http Iintroduce in Angular 2.0
  2. Http used tho make Rest API Call
  3. Http Depends on rxjs Package
  4. In Http ,Debugging is Difficult
  5. Writing unit test cases is Dificult
  6. Performance is poor Compare to HtttpClient
  7. Implementing Http Application is Dificult
  8. We Must Convert Rest API Result Into json formate
  9. may not run in all operating system(os dependent)
  10. No Specific class to Categorized the error

HttpClient

  1. HttpClien introduce in Angular 4
  2. HttpClient used to make Rest API Call
  3. It Won't Depend on rxjs package
  4. Debugging is Easy
  5. Writing unit test cases is easy
  6. Performance is High Compare to Http
  7. Implimenting HttpClient Application Is Easy
  8. HttpClient Automatically Converts the Rest API Result into the json formate
  9. We will execute in All Operating Systems
  10. HttpErrorResponse is used to categorized the error

-HttpErrorResponse is the predefined class in Angular

HttpErrorResponse class introduced in Angular 4.3


要查看或添加评论,请登录

Najim Pathan的更多文章

社区洞察

其他会员也浏览了