docs: update useBody comment to reflect usable methods (#4083)

This commit is contained in:
Bill Gale 2022-04-05 14:56:16 +01:00 committed by GitHub
parent be4a2dea16
commit 0c9d83412c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,7 @@ import { useBody, useCookies, useQuery } from 'h3'
export default async (req, res) => { export default async (req, res) => {
const query = useQuery(req) const query = useQuery(req)
const body = await useBody(req) // only for POST request const body = await useBody(req) // only for POST | PUT | PATCH | DELETE requests
const cookies = useCookies(req) const cookies = useCookies(req)
return { query, body, cookies } return { query, body, cookies }