File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11import { ImageSource } from '@nativescript/core' ;
2- import { request } from './request' ;
32import type { HttpsRequestOptions } from './request' ;
3+ // eslint-disable-next-line no-duplicate-imports
4+ import { request } from './request' ;
45export * from './request' ;
56
67/**
@@ -9,7 +10,7 @@ export * from './request';
910 */
1011export async function getString ( arg : string | HttpsRequestOptions ) : Promise < string > {
1112 const r = await request ( typeof arg === 'string' ? { url : arg , method : 'GET' } : arg ) ;
12- return r . content . toString ( ) ;
13+ return r . content . toStringAsync ( ) ;
1314}
1415
1516/**
@@ -18,7 +19,7 @@ export async function getString(arg: string | HttpsRequestOptions): Promise<stri
1819 */
1920export async function getJSON < T > ( arg : string | HttpsRequestOptions ) : Promise < T > {
2021 const r = await request ( typeof arg === 'string' ? { url : arg , method : 'GET' } : arg ) ;
21- return r . content . toJSON ( ) ;
22+ return r . content . toJSONAsync ( ) ;
2223}
2324
2425/**
You can’t perform that action at this time.
0 commit comments