cdslash
cdslash
CDCloudflare Developers
Created by cdslash on 8/11/2023 in #workers-help
Service binding type
I did find a StackOverflow answer that suggested I just need to stringify the body:
const res = await platform.env.API.fetch(
`https://${url.hostname}/api/validate-session`,
{
method: "POST",
body: JSON.stringify(body),
}
)
const res = await platform.env.API.fetch(
`https://${url.hostname}/api/validate-session`,
{
method: "POST",
body: JSON.stringify(body),
}
)
This now works. https://stackoverflow.com/questions/43997163/how-to-make-request-body-type-compatible-with-requestinit-or-bodyinit-when-using
4 replies
CDCloudflare Developers
Created by cdslash on 8/11/2023 in #workers-help
Service binding type
Ahh, thanks - I wasn't aware of that issue. Is there any workaround other than as any?
4 replies