UNPKG

631 BTypeScriptView Raw
1import type { HttpContext } from '@adonisjs/http-server';
2import type { NextFn } from '@adonisjs/http-server/types';
3import type { BodyParserConfig } from './types.js';
4/**
5 * Bindings to extend request
6 */
7import './bindings/request.js';
8/**
9 * BodyParser middleware parses the incoming request body and set it as
10 * request body to be read later in the request lifecycle.
11 */
12export declare class BodyParserMiddleware {
13 #private;
14 constructor(config: BodyParserConfig);
15 /**
16 * Handle HTTP request body by parsing it as per the user
17 * config
18 */
19 handle(ctx: HttpContext, next: NextFn): Promise<any>;
20}