8.7 released—WinterCG Compliance Part 1
Learn more
HttpContent
interface HttpContent {
  raw: any;
  toArrayBuffer: () => ArrayBuffer;
  toFile: (destinationFilePath?: string) => File;
  toImage: () => Promise<ImageSource>;
  toJSON: (encoding?: HttpResponseEncoding) => any;
  toString: (encoding?: HttpResponseEncoding) => string;
}
Encapsulates the content of an HttpResponse.

Summary

Properties

raw

raw: any
Gets the response body as raw data.

toArrayBuffer

toArrayBuffer: () => ArrayBuffer

toFile

toFile: (destinationFilePath?: string) => File

toImage

toImage: () => Promise<ImageSource>

toJSON

toJSON: (encoding?: HttpResponseEncoding) => any

toString

toString: (encoding?: HttpResponseEncoding) => string