when I using this command to requst the rust rocket rocket = { version = "0.5.0-rc.1", features = ["json"] }
server:
curl 'http://127.0.0.1:8000/manage/app/cruise/channel/v1/page' \
-H 'Accept: */*' \
-H 'Accept-Language: en,zh-CN;q=0.9,zh;q=0.8,zh-TW;q=0.7,fr;q=0.6' \
-H 'Connection: keep-alive' \
-H 'Content-Type: text/plain;charset=UTF-8' \
-H 'DNT: 1' \
-H 'Origin: http://127.0.0.1:8083' \
-H 'Referer: http://127.0.0.1:8083/app/cruise/channel' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'x-access-token: xxxxxxxxxxxxxxx' \
-H 'x-request-id: 31e8c0fa-be6b-4d06-9fa5-54549fe79967' \
-H 'appId: jgjguyyg' \
-H 'userId: 1' \
--data-raw '{"current":1,"pageSize":20,"pageNum":1,"editorPick":null,"minimalReputation":0}' \
--compressed
from the server side, I found the rocket auto lowercase the userId
to userid
. why the rust rocket change the header key? I did not search any explain about this action.