다운로드 결과 response 형식

설명
Tags
download
resposne

다운로드 reponse 데이터 형식

/** * RNFetchBlob response object class. */ export interface FetchBlobResponse { taskId: string; /** * get path of response temp file * @return File path of temp file. */ path(): string; type: "base64" | "path" | "utf8"; data: any; /** * Convert result to javascript RNFetchBlob object. * @return Return a promise resolves Blob object. */ blob(contentType: string, sliceSize: number): Promise<PolyfillBlob>; /** * Convert result to text. * @return Decoded base64 string. */ text(): string | Promise<any>; /** * Convert result to JSON object. * @return Parsed javascript object. */ json(): any; /** * Return BASE64 string directly. * @return BASE64 string of response body. */ base64(): any; /** * Remove cahced file */ flush(): void; respInfo: RNFetchBlobResponseInfo; info(): RNFetchBlobResponseInfo; session(name: string): RNFetchBlobSession | null; /** * Read file content with given encoding, if the response does not contains * a file path, show warning message * @param encode Encode type, should be one of `base64`, `ascrii`, `utf8`. */ readFile(encode: Encoding): Promise<any> | null; /** * Start read stream from cached file * @param encode Encode type, should be one of `base64`, `ascrii`, `utf8`. */ readStream(encode: Encoding): RNFetchBlobStream | null; }