File tree Expand file tree Collapse file tree 4 files changed +26
-8
lines changed
Expand file tree Collapse file tree 4 files changed +26
-8
lines changed Original file line number Diff line number Diff line change 159159 <TypeScriptCompile Include =" android17.d.ts" />
160160 <TypeScriptCompile Include =" promises\promises.ts" />
161161 <TypeScriptCompile Include =" promises\index.ts" />
162- <TypeScriptCompile Include =" http\http.ts" >
163- <DependentUpon >http.d.ts</DependentUpon >
164- </TypeScriptCompile >
165162 <TypeScriptCompile Include =" ios7.d.ts" />
166163 <TypeScriptCompile Include =" globals\index.ts" />
167164 <TypeScriptCompile Include =" timer\index.ts" />
190187 <DependentUpon >http-request.d.ts</DependentUpon >
191188 </TypeScriptCompile >
192189 <TypeScriptCompile Include =" application\application-common.ts" />
190+ <TypeScriptCompile Include =" http\http-common.ts" />
193191 <Content Include =" image-source\Readme.md" />
194192 <TypeScriptCompile Include =" http\http.d.ts" />
195193 <TypeScriptCompile Include =" local-settings\index.ts" />
Original file line number Diff line number Diff line change @@ -4,9 +4,6 @@ import http = require("http/http-request");
44
55// merge request
66export var request = http . request ;
7- export interface HttpResponse extends http . HttpResponse { }
8- export interface HttpRequestOptions extends http . HttpRequestOptions { }
9- export interface HttpContent extends http . HttpContent { }
107
118/**
129 * Gets string from url.
Original file line number Diff line number Diff line change @@ -9,4 +9,27 @@ export declare function getJSON<T>(url: string): promises.Promise<T>
99export declare function getJSON < T > ( options : request . HttpRequestOptions ) : promises . Promise < T >
1010
1111export declare function getImage ( url : string ) : promises . Promise < image . ImageSource >
12- export declare function getImage ( options : request . HttpRequestOptions ) : promises . Promise < image . ImageSource >
12+ export declare function getImage ( options : request . HttpRequestOptions ) : promises . Promise < image . ImageSource >
13+
14+ export declare function request ( options : HttpRequestOptions ) : promises . Promise < HttpResponse > ;
15+
16+ export interface HttpRequestOptions {
17+ url : string ;
18+ method : string ;
19+ headers ?: any ;
20+ content ?: any ;
21+ timeout ?: number ;
22+ }
23+
24+ export interface HttpResponse {
25+ statusCode : number ;
26+ headers : any ;
27+ content ?: HttpContent ;
28+ }
29+
30+ export interface HttpContent {
31+ raw : any ;
32+ toString : ( ) => string ;
33+ toJSON : ( ) => any ;
34+ toImage : ( ) => image . ImageSource ;
35+ }
Original file line number Diff line number Diff line change 11declare var module , require ;
2- module . exports = require ( "http/http" ) ;
2+ module . exports = require ( "http/http-common " ) ;
You can’t perform that action at this time.
0 commit comments