fresh
fresh copied to clipboard
get formdata value faild in post handle
request tool: vscode thunder client
// /routes/api/upload.ts
export const handler = {
async POST(req: Request,): Promise<Response> {
const formdata = await req.formData()
console.log(formdata)
return new Response(JSON.stringify({ data: 'hello word' }));
}
}
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: macos x86_64
Version: 1.23.3
Args: ["/usr/local/bin/deno", "run", "-A", "--watch=static/,routes/", "dev.ts"]
thread 'main' panicked at 'internal error: entered unreachable code', ext/http/lib.rs:561:10
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: <extern "C" fn(A0) .> R as v8::support::CFnFrom<F>>::mapping::c_fn
4: __ZN2v88internal25FunctionCallbackArguments4CallENS0_15CallHandlerInfoE
5: __ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEESA_NS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EENS0_16BuiltinArgumentsE
6: __ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
I think this bug should be fixed in the latest version of Deno.
@lucacasonato ye~