If I have this POST request to an API:
fetch('/api/url/etc', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
username: 'exampleUsername',
password: 'examplePassword',
}),
})
How do I access the request's body? Here is where I'm starting with the API endpoint:
import type { RequestHandler } from '@builder.io/qwik-city'
export const onPost: RequestHandler = async () => {}
Not really sure where to go from here though.