chore(http): assert that url is present when creating new Request

Closes #4650
This commit is contained in:
mgechev
2015-10-10 19:37:29 +03:00
committed by Misko Hevery
parent 1dc8a0a95d
commit ebd15a7855
2 changed files with 9 additions and 4 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import {RequestMethods} from './enums';
import {RequestOptions} from './base_request_options';
import {RequestArgs} from './interfaces';
import {Headers} from './headers';
import {normalizeMethodName} from './http_utils';
import {
@@ -61,7 +61,7 @@ export class Request {
url: string;
// TODO: support URLSearchParams | FormData | Blob | ArrayBuffer
private _body: string;
constructor(requestOptions: RequestOptions) {
constructor(requestOptions: RequestArgs) {
// TODO: assert that url is present
let url = requestOptions.url;
this.url = requestOptions.url;