11import { isString , isPresent , isBlank , makeTypeError } from 'angular2/src/facade/lang' ;
22import { Injectable } from 'angular2/src/di/decorators' ;
3- import { IRequestOptions , Connection , ConnectionBackend } from './interfaces' ;
3+ import { RequestOptionsArgs , Connection , ConnectionBackend } from './interfaces' ;
44import { Request } from './static_request' ;
55import { BaseRequestOptions , RequestOptions } from './base_request_options' ;
66import { RequestMethods } from './enums' ;
@@ -111,7 +111,7 @@ export class Http {
111111 * object can be provided as the 2nd argument. The options object will be merged with the values
112112 * of {@link BaseRequestOptions} before performing the request.
113113 */
114- request ( url : string | Request , options ?: IRequestOptions ) : EventEmitter {
114+ request ( url : string | Request , options ?: RequestOptionsArgs ) : EventEmitter {
115115 var responseObservable : EventEmitter ;
116116 if ( isString ( url ) ) {
117117 responseObservable = httpRequest (
@@ -126,15 +126,15 @@ export class Http {
126126 /**
127127 * Performs a request with `get` http method.
128128 */
129- get ( url : string , options ?: IRequestOptions ) : EventEmitter {
129+ get ( url : string , options ?: RequestOptionsArgs ) : EventEmitter {
130130 return httpRequest ( this . _backend , new Request ( mergeOptions ( this . _defaultOptions , options ,
131131 RequestMethods . GET , url ) ) ) ;
132132 }
133133
134134 /**
135135 * Performs a request with `post` http method.
136136 */
137- post ( url : string , body : string , options ?: IRequestOptions ) : EventEmitter {
137+ post ( url : string , body : string , options ?: RequestOptionsArgs ) : EventEmitter {
138138 return httpRequest (
139139 this . _backend ,
140140 new Request ( mergeOptions ( this . _defaultOptions . merge ( new RequestOptions ( { body : body } ) ) ,
@@ -144,7 +144,7 @@ export class Http {
144144 /**
145145 * Performs a request with `put` http method.
146146 */
147- put ( url : string , body : string , options ?: IRequestOptions ) : EventEmitter {
147+ put ( url : string , body : string , options ?: RequestOptionsArgs ) : EventEmitter {
148148 return httpRequest (
149149 this . _backend ,
150150 new Request ( mergeOptions ( this . _defaultOptions . merge ( new RequestOptions ( { body : body } ) ) ,
@@ -154,15 +154,15 @@ export class Http {
154154 /**
155155 * Performs a request with `delete` http method.
156156 */
157- delete ( url : string , options ?: IRequestOptions ) : EventEmitter {
157+ delete ( url : string , options ?: RequestOptionsArgs ) : EventEmitter {
158158 return httpRequest ( this . _backend , new Request ( mergeOptions ( this . _defaultOptions , options ,
159159 RequestMethods . DELETE , url ) ) ) ;
160160 }
161161
162162 /**
163163 * Performs a request with `patch` http method.
164164 */
165- patch ( url : string , body : string , options ?: IRequestOptions ) : EventEmitter {
165+ patch ( url : string , body : string , options ?: RequestOptionsArgs ) : EventEmitter {
166166 return httpRequest (
167167 this . _backend ,
168168 new Request ( mergeOptions ( this . _defaultOptions . merge ( new RequestOptions ( { body : body } ) ) ,
@@ -172,7 +172,7 @@ export class Http {
172172 /**
173173 * Performs a request with `head` http method.
174174 */
175- head ( url : string , options ?: IRequestOptions ) : EventEmitter {
175+ head ( url : string , options ?: RequestOptionsArgs ) : EventEmitter {
176176 return httpRequest ( this . _backend , new Request ( mergeOptions ( this . _defaultOptions , options ,
177177 RequestMethods . HEAD , url ) ) ) ;
178178 }
@@ -190,7 +190,7 @@ export class Jsonp extends Http {
190190 * object can be provided as the 2nd argument. The options object will be merged with the values
191191 * of {@link BaseRequestOptions} before performing the request.
192192 */
193- request ( url : string | Request , options ?: IRequestOptions ) : EventEmitter {
193+ request ( url : string | Request , options ?: RequestOptionsArgs ) : EventEmitter {
194194 var responseObservable : EventEmitter ;
195195 if ( isString ( url ) ) {
196196 url = new Request ( mergeOptions ( this . _defaultOptions , options , RequestMethods . GET , url ) ) ;
0 commit comments