feat(Http): add Http class

Fixes #2530
This commit is contained in:
Jeff Cross
2015-06-13 15:49:05 -07:00
parent 93596dff3f
commit b68e561c0f
8 changed files with 266 additions and 55 deletions

View File

@ -2,10 +2,14 @@ import {bind, Binding} from 'angular2/di';
import {Http, HttpFactory} from './src/http/http';
import {XHRBackend} from 'angular2/src/http/backends/xhr_backend';
import {BrowserXHR} from 'angular2/src/http/backends/browser_xhr';
import {BaseRequestOptions} from 'angular2/src/http/base_request_options';
export {Http};
export var httpInjectables: List<any> = [
bind(BrowserXHR)
.toValue(BrowserXHR),
XHRBackend,
bind(BrowserXHR).toValue(BrowserXHR),
bind(Http).toFactory(HttpFactory, [XHRBackend])
BaseRequestOptions,
bind(HttpFactory).toFactory(HttpFactory, [XHRBackend, BaseRequestOptions]),
Http
];