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
@Client("/") public interface SomeClient { @Post("/form/body") @Produces(MediaType.APPLICATION_FORM_URLENCODED) HttpResponse<String> sendFormattedFormParameter(@Format("yyyy/MM/dd") LocalDate bodyDate); } ... client.sendFormattedFormParameter(LocalDate.of(2023, 9, 8));
when executed, request URL-encoded form body contains bodyDate=2023%2F09%2F08 as specified with the @Format("yyyy/MM/dd") annotation
bodyDate=2023%2F09%2F08
@Format("yyyy/MM/dd")
when executed, request URL-encoded form body contains bodyDate=2023-09-08
bodyDate=2023-09-08
@Format
please see example application
FormFormatTest
FormFormatTest#testFormParameter()
Expected: 2023/09/08 Actual: 2023-09-08
FormFormatClient
https://github.com/oujesky/micronaut-client-format-bug
4.1.0
The text was updated successfully, but these errors were encountered:
Respect @Format annotation for fields passed as http request body arg…
9dd5fa0
…uments (#9883) Should resolve #9882 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: micronaut-build <[email protected]>
Successfully merging a pull request may close this issue.
Expected Behavior
when executed, request URL-encoded form body contains
bodyDate=2023%2F09%2F08
as specified with the@Format("yyyy/MM/dd")
annotationActual Behaviour
when executed, request URL-encoded form body contains
bodyDate=2023-09-08
@Format
annotation seems to be ignored when client method arguments are passed into URL-encoded form body@Format
annotation correctly works for query parametersSteps To Reproduce
please see example application
FormFormatTest
FormFormatTest#testFormParameter()
will fail withExpected: 2023/09/08 Actual: 2023-09-08
@Format
annotation is defined inFormFormatClient
Environment Information
Example Application
https://github.com/oujesky/micronaut-client-format-bug
Version
4.1.0
The text was updated successfully, but these errors were encountered: