0

I want to send a post request to the rest API which includes an SQL date format, when I try to send the request with YYYY-MM-DD format, its showing bad request. How to properly send the data.

Bimal Sunil
  • 23
  • 1
  • 1
  • 4

1 Answers1

0

you can do something like this below,

 @PostMapping("/date")
    public void date(@RequestParam("date") Date date) {
        // ...
    }

Explanation: It will pass date from post request. you can also look at this documentation

I hope, it helps!

Shyam Patel
  • 381
  • 2
  • 13