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 982bc7f2aa
commit 3511f08a81
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.
*
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
@Injectable()
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.
*
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
export class JSONPConnection implements Connection {
// TODO(issue/24571): remove '!'.
@ -140,6 +141,7 @@ export class JSONPConnection implements Connection {
* A {@link ConnectionBackend} that uses the JSONP strategy of making requests.
*
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
@Injectable()
export class JSONPBackend extends ConnectionBackend {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -101,6 +101,7 @@ function mergeOptions(
* ```
*
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
@Injectable()
export class Http {
@ -189,6 +190,7 @@ export class Http {
/**
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
@Injectable()
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
*
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
@NgModule({
providers: [
@ -61,6 +62,7 @@ export class HttpModule {
* The module that includes jsonp's providers
*
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
@NgModule({
providers: [

View File

@ -18,6 +18,7 @@ import {URLSearchParams} from './url_search_params';
* {@link Request}.
*
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
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.
*
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
export abstract class Connection {
// 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.
*
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
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.
*
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
export interface RequestOptionsArgs {
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.
*
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
export interface ResponseOptionsArgs {
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
* @publicApi
*/
export class Request extends Body {
/**

View File

@ -34,6 +34,7 @@ import {Headers} from './headers';
* most significant.
*
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
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
* @publicApi
**/
export class QueryEncoder {
encodeKey(key: string): string { return standardEncoding(key); }
@ -77,6 +78,7 @@ function standardEncoding(v: string): string {
* let params = new URLSearchParams('', new MyQueryEncoder());
* ```
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
export class URLSearchParams {
paramsMap: Map<string, string[]>;

View File

@ -15,5 +15,6 @@
import {Version} from '@angular/core';
/**
* @deprecated see https://angular.io/guide/http
* @publicApi
*/
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
* @publicApi
*/
export class MockConnection implements Connection {
// 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
* @publicApi
*/
@Injectable()
export class MockBackend implements ConnectionBackend {