docs(http): add language annotations and fix method value to enum
Closes #4348
This commit is contained in:
@@ -24,16 +24,16 @@ import {
|
||||
* One such example is when creating services that wrap higher-level services, like {@link Http},
|
||||
* where it may be useful to generate a `Request` with arbitrary headers and search params.
|
||||
*
|
||||
* ```
|
||||
* ```typescript
|
||||
* import {Injectable, Injector} from 'angular2/angular2';
|
||||
* import {HTTP_BINDINGS, Http, Request} from 'angular2/http';
|
||||
* import {HTTP_BINDINGS, Http, Request, RequestMethods} from 'angular2/http';
|
||||
*
|
||||
* @Injectable()
|
||||
* class AutoAuthenticator {
|
||||
* constructor(public http:Http) {}
|
||||
* request(url:string) {
|
||||
* return this.http.request(new Request({
|
||||
* method: 0, //GET.
|
||||
* method: RequestMethods.Get,
|
||||
* url: url,
|
||||
* search: 'password=123'
|
||||
* }));
|
||||
|
||||
Reference in New Issue
Block a user