NativeScript 9.1 Released → V8 14.9, Vite 8 HMR, built for rapid agentic visual iteration
Dig in

Defined in: http/http-interfaces.ts

Encapsulates the content of an HttpResponse.

Extends ​

Properties ​

raw ​

ts
raw: any;

Defined in: http/http-request-internal/index.d.ts:7

Gets the response body as raw data.

Inherited from ​

ts
BaseHttpContent.raw

requestURL ​

ts
requestURL: string;

Defined in: http/http-request-internal/index.d.ts:11

Gets the request options URL.

Inherited from ​

ts
BaseHttpContent.requestURL

toArrayBuffer ​

ts
toArrayBuffer: () => ArrayBuffer;

Defined in: http/http-interfaces.ts

Gets the response body as ArrayBuffer

Returns ​

ArrayBuffer

Inherited from ​

HttpContentHandler.toArrayBuffer


toFile ​

ts
toFile: (destinationFilePath?: string) => File;

Defined in: http/http-interfaces.ts

Gets the response body as file.

Parameters ​

ParameterType
destinationFilePath?string

Returns ​

File

Inherited from ​

HttpContentHandler.toFile


toImage ​

ts
toImage: () => Promise<ImageSource>;

Defined in: http/http-interfaces.ts

Gets the response body as ImageSource.

Returns ​

Promise<ImageSource>

Inherited from ​

HttpContentHandler.toImage


toJSON ​

ts
toJSON: (encoding?: HttpResponseEncoding) => any;

Defined in: http/http-interfaces.ts

Gets the response body as JSON object.

Parameters ​

ParameterType
encoding?HttpResponseEncoding

Returns ​

any

Inherited from ​

HttpContentHandler.toJSON


toNativeImage ​

ts
toNativeImage: () => Promise<any>;

Defined in: http/http-request-internal/index.d.ts:15

Gets the response native image.

Returns ​

Promise<any>

Inherited from ​

ts
BaseHttpContent.toNativeImage

toNativeString ​

ts
toNativeString: (encoding?: HttpResponseEncoding) => any;

Defined in: http/http-request-internal/index.d.ts:19

Gets the response as native string.

Parameters ​

ParameterType
encoding?HttpResponseEncoding

Returns ​

any

Inherited from ​

ts
BaseHttpContent.toNativeString

toString ​

ts
toString: (encoding?: HttpResponseEncoding) => string;

Defined in: http/http-interfaces.ts

Gets the response body as string.

Parameters ​

ParameterType
encoding?HttpResponseEncoding

Returns ​

string

Inherited from ​

HttpContentHandler.toString