0

I am making a curl request to endpoint with following option curl --data {"foo" : "bar"} for POST request

However I want to implement a default behavior for missing data, ie curl without --data should also work for POST request.

Currently if data is missing it returns: "error":400,"errorCode":"INVALID_JSON". I do not want that.

  1. Is it possible ?
  2. Does it have any annotation to support optional data.?
Tanvi Jaywant
  • 375
  • 1
  • 6
  • 18

0 Answers0