deno.land / x / ky@v0.31.3 / test / helpers / parse-body.ts
12345678910111213import body from 'raw-body';import type {Request} from 'express';
export const parseJsonBody = async <T = any>(request: Request): Promise<T> => { const buffer = await body(request); return JSON.parse(buffer.toString()) as T;};
export const parseRawBody = async (request: Request): Promise<string> => { const buffer = await body(request); return buffer.toString();};
Version Info