Skip to content

Commit 4319563

Browse files
committed
docs(http): add language annotations and fix method value to enum
Closes angular#4348
1 parent e2f5d87 commit 4319563

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

modules/angular2/src/http/base_request_options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class RequestOptions {
115115
*
116116
* ### Example ([live demo](http://plnkr.co/edit/LEKVSx?p=preview))
117117
*
118-
* ```
118+
* ```typescript
119119
* import {bind, bootstrap} from 'angular2/angular2';
120120
* import {HTTP_BINDINGS, Http, BaseRequestOptions, RequestOptions} from 'angular2/http';
121121
* import {App} from './myapp';

modules/angular2/src/http/base_response_options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class ResponseOptions {
114114
*
115115
* ### Example ([live demo](http://plnkr.co/edit/qv8DLT?p=preview))
116116
*
117-
* ```
117+
* ```typescript
118118
* import {bind, bootstrap} from 'angular2/angular2';
119119
* import {HTTP_BINDINGS, Headers, Http, BaseResponseOptions, ResponseOptions} from 'angular2/http';
120120
* import {App} from './myapp';

modules/angular2/src/http/http.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function mergeOptions(defaultOpts, providedOpts, method, url): RequestOptions {
3939
*
4040
* #Example
4141
*
42-
* ```
42+
* ```typescript
4343
* import {Http, HTTP_BINDINGS} from 'angular2/http';
4444
* @Component({selector: 'http-app', viewBindings: [HTTP_BINDINGS]})
4545
* @View({templateUrl: 'people.html'})
@@ -68,7 +68,7 @@ function mergeOptions(defaultOpts, providedOpts, method, url): RequestOptions {
6868
*
6969
* #Example
7070
*
71-
* ```
71+
* ```typescript
7272
* import {MockBackend, BaseRequestOptions, Http} from 'angular2/http';
7373
* var injector = Injector.resolveAndCreate([
7474
* BaseRequestOptions,

modules/angular2/src/http/static_request.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ import {
2424
* One such example is when creating services that wrap higher-level services, like {@link Http},
2525
* where it may be useful to generate a `Request` with arbitrary headers and search params.
2626
*
27-
* ```
27+
* ```typescript
2828
* import {Injectable, Injector} from 'angular2/angular2';
29-
* import {HTTP_BINDINGS, Http, Request} from 'angular2/http';
29+
* import {HTTP_BINDINGS, Http, Request, RequestMethods} from 'angular2/http';
3030
*
3131
* @Injectable()
3232
* class AutoAuthenticator {
3333
* constructor(public http:Http) {}
3434
* request(url:string) {
3535
* return this.http.request(new Request({
36-
* method: 0, //GET.
36+
* method: RequestMethods.Get,
3737
* url: url,
3838
* search: 'password=123'
3939
* }));

0 commit comments

Comments
 (0)