docs(http): move examples to @usageNotes (#26039)

PR Close #26039
This commit is contained in:
Pete Bacon Darwin
2018-09-20 15:01:01 +01:00
committed by Kara Erickson
parent fc4b993d98
commit 32ad2438ca
8 changed files with 32 additions and 54 deletions

View File

@ -209,6 +209,7 @@ export class CookieXSRFStrategy implements XSRFStrategy {
* overridden if a different backend implementation should be used,
* such as in a node backend.
*
* @usageNotes
* ### Example
*
* ```

View File

@ -26,6 +26,7 @@ import {ResponseOptionsArgs} from './interfaces';
* This class may be used in tests to build {@link Response Responses} for
* mock responses (see {@link MockBackend}).
*
* @usageNotes
* ### Example
*
* ```typescript
@ -84,6 +85,7 @@ export class ResponseOptions {
* This may be useful when sharing a base `ResponseOptions` object inside tests,
* where certain properties may change from test to test.
*
* @usageNotes
* ### Example
*
* ```typescript
@ -123,6 +125,7 @@ export class ResponseOptions {
* when configuring an {@link Injector}, in order to override the default options
* used by {@link Http} to create {@link Response Responses}.
*
* @usageNotes
* ### Example
*
* ```typescript

View File

@ -13,6 +13,7 @@
* The only known difference between this `Headers` implementation and the spec is the
* lack of an `entries` method.
*
* @usageNotes
* ### Example
*
* ```

View File

@ -47,6 +47,7 @@ function mergeOptions(
* `request` returns an `Observable` which will emit a single {@link Response} when a
* response is received.
*
* @usageNotes
* ### Example
*
* ```typescript

View File

@ -21,6 +21,7 @@ import {Headers} from './headers';
* usually instantiated by end-users, it is the primary object interacted with when it comes time to
* add data to a view.
*
* @usageNotes
* ### Example
*
* ```

View File

@ -25,9 +25,9 @@ function paramParser(rawParams: string = ''): Map<string, string[]> {
* @deprecated see https://angular.io/guide/http
**/
export class QueryEncoder {
encodeKey(k: string): string { return standardEncoding(k); }
encodeKey(key: string): string { return standardEncoding(key); }
encodeValue(v: string): string { return standardEncoding(v); }
encodeValue(value: string): string { return standardEncoding(value); }
}
function standardEncoding(v: string): string {