Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/superdeno/test/deps.ts>Oak.MultiPartStream

Super-agent driven library for testing Deno HTTP servers.
Latest
class Oak.MultiPartStream
extends ReadableStream<Uint8Array>
import { Oak } from "https://deno.land/x/superdeno@4.9.0/test/deps.ts";
const { MultiPartStream } = Oak;

A class that takes a file (either a Deno.FsFile or Uint8Array) and bytes and streams the ranges as a multi-part encoded HTTP body.

This is specifically used by the .send() functionality to fulfill range requests it receives, and could be used by others when trying to deal with range requests, but is generally a low level API that most users of oak would not need to worry about.

Constructors

new
MultiPartStream(
file: (Deno.Reader & Deno.Seeker & Deno.Closer) | Uint8Array,
type: string,
ranges: ByteRange[],
size: number,
boundary: string,
)

Methods

The content length of the entire streamed body.