export interface IHttpRequestOptions extends Omit < my . IHttpRequestOptions , 'success' | 'fail' | 'complete' > { } export default function httpRequest < R > ( options ) { return new Promise ( ( resolve , reject ) => { ( my . request || my . httpRequest ) . call ( my , { ... options , fail : reject , success : ( res ) => { resolve ( res ? res . data : { } ) ; } , } ) ; } ) ; }