We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm attempting to use Sofa in a Nestjs app, but the Rest endpoints are not receiving the data from post requests.
Here's an example https://github.com/rafakwolf/nestjs-sofa-poc
The text was updated successfully, but these errors were encountered:
Here's how I use it with Nest.
const application = await NestFactory.create(AppModule, { bodyParser: true, rawBody: true, });
import { Request, Response, NextFunction } from 'express'; export function restoreBody( req: Request & { rawBody: Uint8Array }, _res: Response, next: NextFunction ) { if (req.rawBody) { req.body = req.rawBody; } next(); } export default restoreBody;
const app = this.httpAdapterHost.httpAdapter.getInstance(); const sofa = useSofa({ ... }); app.use('/api', restoreBody, sofa);
Sorry, something went wrong.
Is is possible to get a full example of how you use sofa with Nestjs? @2627500295
No branches or pull requests
I'm attempting to use Sofa in a Nestjs app, but the Rest endpoints are not receiving the data from post requests.
Here's an example https://github.com/rafakwolf/nestjs-sofa-poc
The text was updated successfully, but these errors were encountered: