httputils.d.ts 1.2 KB

12345678910111213141516171819202122232425
  1. /**
  2. * Parse a 'Content-Type' header value to the content-type and parameters
  3. * @param {String} rawContentType the raw string to parse from
  4. * @returns {Object} the parsed content type with the fields: type and params
  5. */
  6. export function parseContentType(rawContentType: string): any;
  7. /**
  8. * Parse a 'Content-Range' header value to its start, end, and total parts
  9. * @param {String} rawContentRange the raw string to parse from
  10. * @returns {Object} the parsed parts
  11. */
  12. export function parseContentRange(rawContentRange: string): any;
  13. /**
  14. * Parses a list of byteranges from the given 'multipart/byteranges' HTTP response.
  15. * Each item in the list has the following properties:
  16. * - headers: the HTTP headers
  17. * - data: the sliced ArrayBuffer for that specific part
  18. * - offset: the offset of the byterange within its originating file
  19. * - length: the length of the byterange
  20. * @param {ArrayBuffer} responseArrayBuffer the response to be parsed and split
  21. * @param {String} boundary the boundary string used to split the sections
  22. * @returns {Object[]} the parsed byteranges
  23. */
  24. export function parseByteRanges(responseArrayBuffer: ArrayBuffer, boundary: string): any[];
  25. //# sourceMappingURL=httputils.d.ts.map