H3的方法详解

111次阅读
没有评论

unjs/h3: ⚡️ Minimal H(TTP) framework built for high performance and portability (github.com)

readBody与readRawBody

export default defineEventHandler(async (event) => {
  const body1 = await readBody(event)
  const body2 = await readRawBody(event)
  const body3 = await readRawBody(event, 'utf8')
  console.log('body1', body1, typeof body1)
  console.log('body2', body2, typeof body2)
  console.log('body3', body3, typeof body3)
});
H3的方法详解
正文完
 
wujingquan
版权声明:本站原创文章,由 wujingquan 2023-09-03发表,共计371字。
转载说明:Unless otherwise specified, all articles are published by cc-4.0 protocol. Please indicate the source of reprint.
评论(没有评论)