angular2-polyfill icon indicating copy to clipboard operation
angular2-polyfill copied to clipboard

Make `Http` Angular 2 compliant

Open SamVerschueren opened this issue 9 years ago • 1 comments

All the HTTP methods should transform their responses to observables to make it Angular 2 compliant.

  • [x] Return observables https://github.com/SamVerschueren/angular2-polyfill/commit/f98bdcee1c205a91d11636c7118371d34839008b
  • [ ] Transform response to ng2 response
  • [ ] Add possibility to inject extra options (see RequestOptions)

SamVerschueren avatar Apr 03 '16 17:04 SamVerschueren

This isn't the only thing that should be done to make it angular 2 compliant. The response that is returned by the service should be a ng2 response object as well with methods like toJson(), etc.

Some references:

https://github.com/angular/angular/blob/2.0.0-beta.15/modules/angular2/src/http/http.ts https://github.com/angular/angular/blob/2.0.0-beta.15/modules/angular2/src/http/static_response.ts

And what's up with that ConnectionBackend stuff?

https://github.com/angular/angular/blob/2.0.0-beta.15/modules/angular2/src/http/base_request_options.ts

SamVerschueren avatar Apr 16 '16 20:04 SamVerschueren