context.request.body is not a function #650
-
I'm not sure what's changed as my code was working a couple of weeks ago. The latest version of oak dns seems to be down so I've reverted back to some older versions but having all sorts of issues now like this. "error: "context.request.body is not a function" When trying to parse the body how I previously parsed it.. const body = await context.request.body().value; Using "import { Router } from 'https://deno.land/x/[email protected]/mod.ts';" |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This was a breaking change in oak v13 and later, as documented here: https://github.com/oakserver/oak/?tab=readme-ov-file#request-body and here: https://github.com/oakserver/oak/blob/main/CHANGELOG.md#version-1300 Please take a look at the documentation on how to adjust your code: https://jsr.io/@oak/oak/doc/~/Request#accessor_body |
Beta Was this translation helpful? Give feedback.
This was a breaking change in oak v13 and later, as documented here: https://github.com/oakserver/oak/?tab=readme-ov-file#request-body and here: https://github.com/oakserver/oak/blob/main/CHANGELOG.md#version-1300
Please take a look at the documentation on how to adjust your code: https://jsr.io/@oak/oak/doc/~/Request#accessor_body