Skip to content

Latest commit

 

History

History
218 lines (129 loc) · 4.55 KB

HttpContent.md

File metadata and controls

218 lines (129 loc) · 4.55 KB
title HttpContent
titleTemplate title - API / NativeScript
description Encapsulates the content of an HttpResponse.
contributors false

Defined in: http/http-interfaces.ts

Encapsulates the content of an HttpResponse.

Extends

Properties

raw

raw: any;

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

Gets the response body as raw data.

Inherited from

BaseHttpContent.raw

requestURL

requestURL: string;

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

Gets the request options URL.

Inherited from

BaseHttpContent.requestURL

toArrayBuffer

toArrayBuffer: () => ArrayBuffer;

Defined in: http/http-interfaces.ts

Gets the response body as ArrayBuffer

Returns

ArrayBuffer

Inherited from

HttpContentHandler.toArrayBuffer


toFile

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

Defined in: http/http-interfaces.ts

Gets the response body as file.

Parameters

Parameter Type
destinationFilePath? string

Returns

File

Inherited from

HttpContentHandler.toFile


toImage

toImage: () => Promise<ImageSource>;

Defined in: http/http-interfaces.ts

Gets the response body as ImageSource.

Returns

Promise<ImageSource>

Inherited from

HttpContentHandler.toImage


toJSON

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

Defined in: http/http-interfaces.ts

Gets the response body as JSON object.

Parameters

Parameter Type
encoding? HttpResponseEncoding

Returns

any

Inherited from

HttpContentHandler.toJSON


toNativeImage

toNativeImage: () => Promise<any>;

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

Gets the response native image.

Returns

Promise<any>

Inherited from

BaseHttpContent.toNativeImage

toNativeString

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

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

Gets the response as native string.

Parameters

Parameter Type
encoding? HttpResponseEncoding

Returns

any

Inherited from

BaseHttpContent.toNativeString

toString

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

Defined in: http/http-interfaces.ts

Gets the response body as string.

Parameters

Parameter Type
encoding? HttpResponseEncoding

Returns

string

Inherited from

HttpContentHandler.toString