Explorar el Código

simplify curl examples, server now handles encoding automatically

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
LoganZ2 hace 3 días
padre
commit
beabb9a5a0
Se han modificado 1 ficheros con 3 adiciones y 5 borrados
  1. 3 5
      README.md

+ 3 - 5
README.md

@@ -129,14 +129,12 @@ npm run build
 
 ### 上传游戏 bundle
 
-`x-game-name`、`x-game-description`、`x-game-controls` 含非 ASCII 字符时必须 URL encode,否则服务端会乱码。
-
 ```bash
 curl -X POST https://loganz2.cn/api/games/bundle \
   -H "x-game-id: my-game" \
-  -H "x-game-name: $(python3 -c "import urllib.parse; print(urllib.parse.quote('我的游戏'))")" \
-  -H "x-game-description: $(python3 -c "import urllib.parse; print(urllib.parse.quote('游戏描述'))")" \
-  -H "x-game-controls: $(python3 -c "import urllib.parse; print(urllib.parse.quote('方向键移动'))")" \
+  -H "x-game-name: 我的游戏" \
+  -H "x-game-description: 游戏描述" \
+  -H "x-game-controls: 方向键移动" \
   -H "content-type: application/javascript" \
   --data-binary "@bundle.js"
 ```