mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
http module refactored
This commit is contained in:
28
http/http-request.d.ts
vendored
28
http/http-request.d.ts
vendored
@ -1,28 +0,0 @@
|
||||
/**
|
||||
* The http client interface.
|
||||
*/
|
||||
import image_module = require("image-source/image-source");
|
||||
import promises = require("promises/promises");
|
||||
|
||||
export declare function request(options: HttpRequestOptions): promises.Promise<HttpResponse>;
|
||||
|
||||
export interface HttpRequestOptions {
|
||||
url: string;
|
||||
method: string;
|
||||
headers?: any;
|
||||
content?: any;
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
export interface HttpResponse {
|
||||
statusCode: number;
|
||||
headers: any;
|
||||
content?: HttpContent;
|
||||
}
|
||||
|
||||
export interface HttpContent {
|
||||
raw: any;
|
||||
toString: () => string;
|
||||
toJSON: () => any;
|
||||
toImage: () => image_module.ImageSource;
|
||||
}
|
Reference in New Issue
Block a user