Fastify Raw Body

screenshot of Fastify Raw Body
strapi

Request raw body

Overview

The fastify-raw-body is a plugin for the Fastify framework that adds the raw body to the Fastify request object. It allows users to retrieve the raw body data using the preParsing hook. It is important to note that this plugin requires awaiting registration to ensure it is ready to use.

Features

  • Adds the raw body to the Fastify request object
  • Allows retrieval of raw body data using the preParsing hook
  • Can be configured to save memory by setting global: false and using it only for specific routes
  • Supports raw body as a Buffer
  • Includes a content type parser for application/json

Summary

The fastify-raw-body plugin is a useful addition to the Fastify framework as it allows users to access the raw body data of incoming requests. By using the preParsing hook, developers can easily retrieve the raw body and perform further processing if needed. Additionally, the plugin provides options for memory optimization and supports raw body as a Buffer. Overall, the fastify-raw-body plugin enhances the functionality of Fastify and provides developers with greater flexibility in handling request data.

strapi
Strapi

Strapi is an open source headless CMS that provides a customizable content management system and API for your projects. It allows you to manage content in a visual interface and use a REST or GraphQL API to retrieve the data.