mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
http and file-system naming changed to use "-"
This commit is contained in:
28
http/http-request.d.ts
vendored
Normal file
28
http/http-request.d.ts
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* The http client interface.
|
||||
*/
|
||||
import image_module = require("image/image");
|
||||
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.Image;
|
||||
}
|
||||
Reference in New Issue
Block a user