refactor(http): rename enums to be singular
ReadyStates -> ReadyState RequestMethods -> RequestMethod ResponseTypes -> ResponseType Fixes #5574 BREAKING CHANGE: Before import {ReadyStates, RequestMethods, ResponseTypes} from 'angular2/http'; After import {ReadyState, RequestMethod, ResponseType} from 'angular2/http'; Closes #5584
This commit is contained in:
committed by
Cédric Exbrayat
parent
654496b315
commit
b925ff5b8d
@@ -1,4 +1,4 @@
|
||||
import {RequestMethods} from './enums';
|
||||
import {RequestMethod} from './enums';
|
||||
import {RequestArgs} from './interfaces';
|
||||
import {Headers} from './headers';
|
||||
import {normalizeMethodName} from './http_utils';
|
||||
@@ -26,14 +26,14 @@ import {
|
||||
*
|
||||
* ```typescript
|
||||
* import {Injectable, Injector} from 'angular2/angular2';
|
||||
* import {HTTP_PROVIDERS, Http, Request, RequestMethods} from 'angular2/http';
|
||||
* import {HTTP_PROVIDERS, Http, Request, RequestMethod} from 'angular2/http';
|
||||
*
|
||||
* @Injectable()
|
||||
* class AutoAuthenticator {
|
||||
* constructor(public http:Http) {}
|
||||
* request(url:string) {
|
||||
* return this.http.request(new Request({
|
||||
* method: RequestMethods.Get,
|
||||
* method: RequestMethod.Get,
|
||||
* url: url,
|
||||
* search: 'password=123'
|
||||
* }));
|
||||
@@ -52,7 +52,7 @@ export class Request {
|
||||
/**
|
||||
* Http method with which to perform the request.
|
||||
*/
|
||||
method: RequestMethods;
|
||||
method: RequestMethod;
|
||||
/**
|
||||
* {@link Headers} instance
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user