Skip to content
New issue

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

Request Method is OPTIONS when Post Json #3

Open
NightFarmer opened this issue May 21, 2019 · 1 comment
Open

Request Method is OPTIONS when Post Json #3

NightFarmer opened this issue May 21, 2019 · 1 comment

Comments

@NightFarmer
Copy link

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
@kataras
Copy link
Member

kataras commented May 25, 2019

Hello @NightFarmer, can you post a repository example that can reproduce this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants