Closed CoderYellow closed 3 years ago
Are there any ways to bind the http body to the paremeter?
Please upload an example application
Please upload an example application
Argument binders can be called multiple times, including before the body is available. You can check if the body is present, and if not, return UNSATISFIED. That will trigger the binder to be called again after the body is available. This is documented here https://docs.micronaut.io/latest/guide/#customArgumentBinding
Thanks for reporting an issue, please review the task list below before submitting the issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.
NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (https://stackoverflow.com/tags/micronaut) or Gitter (https://gitter.im/micronautfw/). DO NOT use the issue tracker to ask questions.
Task List
Steps to Reproduce
Expected Behaviour
Http body should not be empty like DefaultBodyAnnotationBinder:
Actual Behaviour
Empty in ShoppingCartRequestArgumentBinder#bind
Environment Information
Micronaut Version:
openjdk version "1.8.0_292" OpenJDK Runtime Environment (build 1.8.0_292-b10) Eclipse OpenJ9 VM (build openj9-0.26.0, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20210421_1000 (JIT enabled, AOT enabled) OpenJ9 - b4cc246d9 OMR - 162e6f729 JCL - 2a5e268814 based on jdk8u292-b10)