Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(http): remove deprecated stuff and outdated plunkrs #15598

Merged
merged 1 commit into from Mar 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 8 additions & 19 deletions packages/http/src/base_request_options.ts
Expand Up @@ -25,16 +25,14 @@ import {URLSearchParams} from './url_search_params';
* All values are null by default. Typical defaults can be found in the {@link BaseRequestOptions}
* class, which sub-classes `RequestOptions`.
*
* ### Example ([live demo](http://plnkr.co/edit/7Wvi3lfLq41aQPKlxB4O?p=preview))
*
* ```typescript
* import {RequestOptions, Request, RequestMethod} from '@angular/http';
*
* var options = new RequestOptions({
* const options = new RequestOptions({
* method: RequestMethod.Post,
* url: 'https://google.com'
* });
* var req = new Request(options);
* const req = new Request(options);
* console.log('req.method:', RequestMethod[req.method]); // Post
* console.log('options.url:', options.url); // https://google.com
* ```
Expand Down Expand Up @@ -102,15 +100,13 @@ export class RequestOptions {
* the `options` object. If these values should be merged, it should be done prior to calling
* `merge` on the `RequestOptions` instance.
*
* ### Example ([live demo](http://plnkr.co/edit/6w8XA8YTkDRcPYpdB9dk?p=preview))
*
* ```typescript
* import {RequestOptions, Request, RequestMethod} from '@angular/http';
*
* var options = new RequestOptions({
* const options = new RequestOptions({
* method: RequestMethod.Post
* });
* var req = new Request(options.merge({
* const req = new Request(options.merge({
* url: 'https://google.com'
* }));
* console.log('req.method:', RequestMethod[req.method]); // Post
Expand Down Expand Up @@ -179,31 +175,24 @@ export class RequestOptions {
* when configuring an {@link Injector}, in order to override the default options
* used by {@link Http} to create and send {@link Request Requests}.
*
* ### Example ([live demo](http://plnkr.co/edit/LEKVSx?p=preview))
*
* ```typescript
* import {provide} from '@angular/core';
* import {bootstrap} from '@angular/platform-browser/browser';
* import {HTTP_PROVIDERS, Http, BaseRequestOptions, RequestOptions} from '@angular/http';
* import {App} from './myapp';
* import {BaseRequestOptions, RequestOptions} from '@angular/http';
*
* class MyOptions extends BaseRequestOptions {
* search: string = 'coreTeam=true';
* }
*
* bootstrap(App, [HTTP_PROVIDERS, {provide: RequestOptions, useClass: MyOptions}]);
* {provide: RequestOptions, useClass: MyOptions};
* ```
*
* The options could also be extended when manually creating a {@link Request}
* object.
*
* ### Example ([live demo](http://plnkr.co/edit/oyBoEvNtDhOSfi9YxaVb?p=preview))
*
* ```
* import {BaseRequestOptions, Request, RequestMethod} from '@angular/http';
*
* var options = new BaseRequestOptions();
* var req = new Request(options.merge({
* const options = new BaseRequestOptions();
* const req = new Request(options.merge({
* method: RequestMethod.Post,
* url: 'https://google.com'
* }));
Expand Down