mirror of
				https://github.com/NativeScript/NativeScript.git
				synced 2025-11-04 21:06:45 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			611 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			611 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
/**
 | 
						|
  * 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;
 | 
						|
} |