import { Response } from "https://deno.land/x/oak@v17.0.0/response.ts";
Instead of responding based on the values of the response, explicitly set
the response with a Fetch API Response
.
If the response is already finalized, this will throw. You can check
the .writable
property to determine the state if you are unsure.
[!NOTE] This will ignore/override values set in the response like the body, headers and status, meaning things like cookie management and automatic body typing will be ignored.
Instead of responding based on the values of the response, explicitly set
the response by providing the initialization to create a Fetch API
Response
.
If the response is already finalized, this will throw. You can check
the .writable
property to determine the state if you are unsure.
[!NOTE] This will ignore/override values set in the response like the body, headers and status, meaning things like cookie management and automatic body typing will be ignored.