swagger
swagger copied to clipboard
Request Method is OPTIONS when Post Json
When I use the POST method to accept the JSON parameter, click the Try it out
button, and swagger sends an OPTIONS type request.
here is my code:
// @Accept json
// @Param req body bean.Dog true "InstanceCreateReq"
// @Success 200 {string} string "ok"
// @Router /demo/dog [post]
the request by swagger try is:
Request URL: http://127.0.0.1:8888/demo/dog
Request Method: OPTIONS
Status Code: 404 Not Found
Remote Address: 127.0.0.1:8888
Referrer Policy: no-referrer-when-downgrade
Hello @NightFarmer, can you post a repository example that can reproduce this case?