chore(http): remove unused properties from Request

This removes properties mentioned in #3339

Closes #3339
Closes #3823
This commit is contained in:
Pascal Precht
2015-08-25 10:27:59 +02:00
committed by Jeff Cross
parent 2acc1ad08b
commit 5a3ce87915
6 changed files with 8 additions and 79 deletions
+1 -7
View File
@@ -1,4 +1,4 @@
import {RequestMethods, RequestModesOpts, RequestCredentialsOpts, RequestCacheOpts} from './enums';
import {RequestMethods} from './enums';
import {RequestOptions} from './base_request_options';
import {Headers} from './headers';
import {
@@ -26,8 +26,6 @@ export class Request {
* Defaults to GET.
*/
method: RequestMethods;
mode: RequestModesOpts;
credentials: RequestCredentialsOpts;
/**
* Headers object based on the `Headers` class in the [Fetch
* Spec](https://fetch.spec.whatwg.org/#headers-class). {@link Headers} class reference.
@@ -37,7 +35,6 @@ export class Request {
url: string;
// TODO: support URLSearchParams | FormData | Blob | ArrayBuffer
private _body: string;
cache: RequestCacheOpts;
constructor(requestOptions: RequestOptions) {
// TODO: assert that url is present
let url = requestOptions.url;
@@ -56,12 +53,9 @@ export class Request {
this._body = requestOptions.body;
this.method = requestOptions.method;
// TODO(jeffbcross): implement behavior
this.mode = requestOptions.mode;
// Defaults to 'omit', consistent with browser
// TODO(jeffbcross): implement behavior
this.credentials = requestOptions.credentials;
this.headers = new Headers(requestOptions.headers);
this.cache = requestOptions.cache;
}