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

Parameters of GET requests cannot be empty. #2532

Closed
JJYY2333 opened this issue Oct 18, 2022 · 10 comments
Closed

Parameters of GET requests cannot be empty. #2532

JJYY2333 opened this issue Oct 18, 2022 · 10 comments

Comments

@JJYY2333
Copy link

在编写get请求的api接口时(如/api/v1/user?id=xxxx&name=xxx),若前端返回/api/v1/user?id=xxxx&name= 或 /api/v1/user?id=xxxx都会返回400错误,即使我设置了type request的默认值也不行,有什么办法吗

@kevwan kevwan changed the title get请求参数不能为空的问题 Parameters of GET requests cannot be empty. Oct 19, 2022
@kevwan
Copy link
Contributor

kevwan commented Oct 19, 2022

how did you define the Request in API file?

@kesonan
Copy link
Collaborator

kesonan commented Oct 21, 2022

Please check that the request in your api file is in the following format

type request{
 ID string `form:"id,optional"`
Name string `form:"name,optional"`
}

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 21, 2023
@JJYY2333
Copy link
Author

JJYY2333 commented Oct 21, 2023 via email

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The email has been received and will be processed.

@github-actions github-actions bot removed the stale label Oct 22, 2023
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 22, 2024
@JJYY2333
Copy link
Author

JJYY2333 commented Oct 22, 2024 via email

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The email has been received and will be processed.

@github-actions github-actions bot removed the stale label Oct 26, 2024
@kevwan kevwan closed this as completed Jan 28, 2025
@JJYY2333
Copy link
Author

JJYY2333 commented Jan 28, 2025 via email

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The mail has been received and it will be processed.

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

4 participants