UNPKG

@adonisjs/bodyparser

Version:

BodyParser middleware for AdonisJS http server to read and parse request body

27 lines (26 loc) 991 B
import type { FeatureFlags } from '@adonisjs/application'; import type { ExperimentalFlagsList } from '@adonisjs/application/types'; import { BodyParserMiddleware } from '../src/bodyparser_middleware.ts'; import type { BodyParserOptionalConfig } from '../src/types.ts'; /** * Factory to create bodyparser middleware instances with custom configuration */ export declare class BodyParserMiddlewareFactory { #private; /** * Merge additional configuration options with the existing configuration * * @param config - Configuration options to merge */ merge(config: BodyParserOptionalConfig): this; /** * Specify the feature flags to share with the bodyparser middleware * * @param featureFlags - Feature flags to configure */ withFeatureFlags(featureFlags: FeatureFlags<ExperimentalFlagsList>): this; /** * Create a new BodyParserMiddleware instance with the configured options */ create(): BodyParserMiddleware; }