2016-06-23 09:47:54 -07:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
2015-06-24 00:27:07 -07:00
|
|
|
/**
|
|
|
|
* Supported http methods.
|
2017-08-28 10:29:35 -07:00
|
|
|
* @deprecated use @angular/common/http instead
|
2015-06-24 00:27:07 -07:00
|
|
|
*/
|
2015-12-03 22:44:14 +01:00
|
|
|
export enum RequestMethod {
|
2015-08-26 13:40:12 -07:00
|
|
|
Get,
|
|
|
|
Post,
|
|
|
|
Put,
|
|
|
|
Delete,
|
|
|
|
Options,
|
|
|
|
Head,
|
|
|
|
Patch
|
2015-06-19 10:18:44 -07:00
|
|
|
}
|
2015-04-28 23:07:55 -07:00
|
|
|
|
2015-06-24 00:27:07 -07:00
|
|
|
/**
|
|
|
|
* All possible states in which a connection can be, based on
|
|
|
|
* [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an
|
|
|
|
* additional "CANCELLED" state.
|
2017-08-28 10:29:35 -07:00
|
|
|
* @deprecated use @angular/common/http instead
|
2015-06-24 00:27:07 -07:00
|
|
|
*/
|
2015-12-03 22:44:14 +01:00
|
|
|
export enum ReadyState {
|
2015-08-26 13:40:12 -07:00
|
|
|
Unsent,
|
|
|
|
Open,
|
|
|
|
HeadersReceived,
|
|
|
|
Loading,
|
|
|
|
Done,
|
|
|
|
Cancelled
|
2015-06-19 10:18:44 -07:00
|
|
|
}
|
2015-04-28 23:07:55 -07:00
|
|
|
|
2015-06-24 00:27:07 -07:00
|
|
|
/**
|
|
|
|
* Acceptable response types to be associated with a {@link Response}, based on
|
|
|
|
* [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.
|
2017-08-28 10:29:35 -07:00
|
|
|
* @deprecated use @angular/common/http instead
|
2015-06-24 00:27:07 -07:00
|
|
|
*/
|
2015-12-03 22:44:14 +01:00
|
|
|
export enum ResponseType {
|
2015-06-19 10:18:44 -07:00
|
|
|
Basic,
|
|
|
|
Cors,
|
|
|
|
Default,
|
|
|
|
Error,
|
|
|
|
Opaque
|
|
|
|
}
|
2016-02-26 12:25:55 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Supported content type to be automatically associated with a {@link Request}.
|
2017-08-28 10:29:35 -07:00
|
|
|
* @deprecated use @angular/common/http instead
|
2016-02-26 12:25:55 +01:00
|
|
|
*/
|
|
|
|
export enum ContentType {
|
|
|
|
NONE,
|
|
|
|
JSON,
|
|
|
|
FORM,
|
|
|
|
FORM_DATA,
|
|
|
|
TEXT,
|
|
|
|
BLOB,
|
|
|
|
ARRAY_BUFFER
|
|
|
|
}
|
2016-02-24 16:37:18 +01:00
|
|
|
|
2016-05-27 00:47:20 +02:00
|
|
|
/**
|
2016-02-24 16:37:18 +01:00
|
|
|
* Define which buffer to use to store the response
|
2017-08-28 10:29:35 -07:00
|
|
|
* @deprecated use @angular/common/http instead
|
2016-02-24 16:37:18 +01:00
|
|
|
*/
|
2016-05-27 00:47:20 +02:00
|
|
|
export enum ResponseContentType {
|
2016-07-21 22:44:38 +02:00
|
|
|
Text,
|
2016-02-24 16:37:18 +01:00
|
|
|
Json,
|
2016-07-21 22:44:38 +02:00
|
|
|
ArrayBuffer,
|
|
|
|
Blob
|
2016-02-24 16:37:18 +01:00
|
|
|
}
|