coderwhy / coderwhy/hy_vue3_ts_cms

coderwhy 老师,后端的接口必须 content-type=application/x-www-form-urlencoded 参数查询才有效吗?

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vue
Stars
54
Forks
12
Avg merge
1d 16h
Merged PRs (30d)
5

Description

这样设置参数无法生效,token没贴
curl 'http://localhost:8080/api/users/list?offset=0&size=10&cellphone=177'
-X 'POST'
--compressed
好像只有这样才可以
curl --location --request POST 'http://152.136.185.210:5000/users/list'
--header 'Content-Type: application/x-www-form-urlencoded'
--data-urlencode 'cellphone=177'
--data-urlencode 'id='
--data-urlencode 'name='
--data-urlencode 'offset=0'
--data-urlencode 'size=1'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two POST requests shown for /api/users/list and /users/list, comparing query-string parameters with application/x-www-form-urlencoded body parameters. Inspect the backend handler for the list endpoint and determine which parameter location it accepts. Done means the intended request format is documented or the endpoint consistently accepts the required parameters.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.