docs: update http with @publicApi tags (#26595)

PR Close #26595
This commit is contained in:
Pete Bacon Darwin 2018-10-19 17:47:13 +01:00 committed by Alex Rickabaugh
parent 1498dc2dca
commit df4e85907c
15 changed files with 31 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import {Injectable} from '@angular/core';
* Take care not to evaluate this in non-browser contexts. * Take care not to evaluate this in non-browser contexts.
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
@Injectable() @Injectable()
export class BrowserXhr { export class BrowserXhr {

View File

@ -24,6 +24,7 @@ const JSONP_ERR_WRONG_METHOD = 'JSONP requests must use GET request method.';
* Base class for an in-flight JSONP request. * Base class for an in-flight JSONP request.
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export class JSONPConnection implements Connection { export class JSONPConnection implements Connection {
// TODO(issue/24571): remove '!'. // TODO(issue/24571): remove '!'.
@ -140,6 +141,7 @@ export class JSONPConnection implements Connection {
* A {@link ConnectionBackend} that uses the JSONP strategy of making requests. * A {@link ConnectionBackend} that uses the JSONP strategy of making requests.
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
@Injectable() @Injectable()
export class JSONPBackend extends ConnectionBackend { export class JSONPBackend extends ConnectionBackend {

View File

@ -29,6 +29,7 @@ const XSSI_PREFIX = /^\)\]\}',?\n/;
* the {@link MockConnection} may be interacted with in tests. * the {@link MockConnection} may be interacted with in tests.
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export class XHRConnection implements Connection { export class XHRConnection implements Connection {
request: Request; request: Request;
@ -189,6 +190,7 @@ export class XHRConnection implements Connection {
* details. * details.
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export class CookieXSRFStrategy implements XSRFStrategy { export class CookieXSRFStrategy implements XSRFStrategy {
constructor( constructor(
@ -228,6 +230,7 @@ export class CookieXSRFStrategy implements XSRFStrategy {
* } * }
* ``` * ```
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
@Injectable() @Injectable()
export class XHRBackend implements ConnectionBackend { export class XHRBackend implements ConnectionBackend {

View File

@ -38,6 +38,7 @@ import {URLSearchParams} from './url_search_params';
* ``` * ```
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export class RequestOptions { export class RequestOptions {
/** /**
@ -201,6 +202,7 @@ export class RequestOptions {
* ``` * ```
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
@Injectable() @Injectable()
export class BaseRequestOptions extends RequestOptions { export class BaseRequestOptions extends RequestOptions {

View File

@ -41,6 +41,7 @@ import {ResponseOptionsArgs} from './interfaces';
* ``` * ```
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export class ResponseOptions { export class ResponseOptions {
// TODO: FormData | Blob // TODO: FormData | Blob
@ -160,6 +161,7 @@ export class ResponseOptions {
* ``` * ```
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
@Injectable() @Injectable()
export class BaseResponseOptions extends ResponseOptions { export class BaseResponseOptions extends ResponseOptions {

View File

@ -9,6 +9,7 @@
/** /**
* Supported http methods. * Supported http methods.
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export enum RequestMethod { export enum RequestMethod {
Get, Get,
@ -25,6 +26,7 @@ export enum RequestMethod {
* [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an * [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an
* additional "CANCELLED" state. * additional "CANCELLED" state.
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export enum ReadyState { export enum ReadyState {
Unsent, Unsent,
@ -39,6 +41,7 @@ export enum ReadyState {
* Acceptable response types to be associated with a {@link Response}, based on * Acceptable response types to be associated with a {@link Response}, based on
* [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec. * [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export enum ResponseType { export enum ResponseType {
Basic, Basic,
@ -65,6 +68,7 @@ export enum ContentType {
/** /**
* Define which buffer to use to store the response * Define which buffer to use to store the response
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export enum ResponseContentType { export enum ResponseContentType {
Text, Text,

View File

@ -34,6 +34,7 @@
* ``` * ```
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export class Headers { export class Headers {
/** @internal header names are lower case */ /** @internal header names are lower case */

View File

@ -101,6 +101,7 @@ function mergeOptions(
* ``` * ```
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
@Injectable() @Injectable()
export class Http { export class Http {
@ -189,6 +190,7 @@ export class Http {
/** /**
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
@Injectable() @Injectable()
export class Jsonp extends Http { export class Jsonp extends Http {

View File

@ -41,6 +41,7 @@ export function jsonpFactory(jsonpBackend: JSONPBackend, requestOptions: Request
* The module that includes http's providers * The module that includes http's providers
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
@NgModule({ @NgModule({
providers: [ providers: [
@ -61,6 +62,7 @@ export class HttpModule {
* The module that includes jsonp's providers * The module that includes jsonp's providers
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
@NgModule({ @NgModule({
providers: [ providers: [

View File

@ -18,6 +18,7 @@ import {URLSearchParams} from './url_search_params';
* {@link Request}. * {@link Request}.
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export abstract class ConnectionBackend { abstract createConnection(request: any): Connection; } export abstract class ConnectionBackend { abstract createConnection(request: any): Connection; }
@ -25,6 +26,7 @@ export abstract class ConnectionBackend { abstract createConnection(request: any
* Abstract class from which real connections are derived. * Abstract class from which real connections are derived.
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export abstract class Connection { export abstract class Connection {
// TODO(issue/24571): remove '!'. // TODO(issue/24571): remove '!'.
@ -38,6 +40,7 @@ export abstract class Connection {
* An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request. * An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request.
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export abstract class XSRFStrategy { abstract configureRequest(req: Request): void; } export abstract class XSRFStrategy { abstract configureRequest(req: Request): void; }
@ -46,6 +49,7 @@ export abstract class XSRFStrategy { abstract configureRequest(req: Request): vo
* [RequestInit](https://fetch.spec.whatwg.org/#requestinit) from the Fetch spec. * [RequestInit](https://fetch.spec.whatwg.org/#requestinit) from the Fetch spec.
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export interface RequestOptionsArgs { export interface RequestOptionsArgs {
url?: string|null; url?: string|null;
@ -69,6 +73,7 @@ export interface RequestArgs extends RequestOptionsArgs { url: string|null; }
* [ResponseInit](https://fetch.spec.whatwg.org/#responseinit) from the Fetch spec. * [ResponseInit](https://fetch.spec.whatwg.org/#responseinit) from the Fetch spec.
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export interface ResponseOptionsArgs { export interface ResponseOptionsArgs {
body?: string|Object|FormData|ArrayBuffer|Blob|null; body?: string|Object|FormData|ArrayBuffer|Blob|null;

View File

@ -53,6 +53,7 @@ import {URLSearchParams} from './url_search_params';
* ``` * ```
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export class Request extends Body { export class Request extends Body {
/** /**

View File

@ -34,6 +34,7 @@ import {Headers} from './headers';
* most significant. * most significant.
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export class Response extends Body { export class Response extends Body {
/** /**

View File

@ -23,6 +23,7 @@ function paramParser(rawParams: string = ''): Map<string, string[]> {
} }
/** /**
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
**/ **/
export class QueryEncoder { export class QueryEncoder {
encodeKey(key: string): string { return standardEncoding(key); } encodeKey(key: string): string { return standardEncoding(key); }
@ -77,6 +78,7 @@ function standardEncoding(v: string): string {
* let params = new URLSearchParams('', new MyQueryEncoder()); * let params = new URLSearchParams('', new MyQueryEncoder());
* ``` * ```
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export class URLSearchParams { export class URLSearchParams {
paramsMap: Map<string, string[]>; paramsMap: Map<string, string[]>;

View File

@ -15,5 +15,6 @@
import {Version} from '@angular/core'; import {Version} from '@angular/core';
/** /**
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export const VERSION = new Version('0.0.0-PLACEHOLDER'); export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -37,6 +37,7 @@ import {take} from 'rxjs/operators';
* ``` * ```
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
export class MockConnection implements Connection { export class MockConnection implements Connection {
// TODO: Name `readyState` should change to be more generic, and states could be made to be more // TODO: Name `readyState` should change to be more generic, and states could be made to be more
@ -190,6 +191,7 @@ export class MockConnection implements Connection {
* ``` * ```
* *
* @deprecated see https://angular.io/guide/http * @deprecated see https://angular.io/guide/http
* @publicApi
*/ */
@Injectable() @Injectable()
export class MockBackend implements ConnectionBackend { export class MockBackend implements ConnectionBackend {