Hey,
I have some questions about around: 'Create a new Swiss tournament' and 'Update a Swiss tournament'.
-
Should I use: ''application/x-www-form-urlencoded' or 'Content-Type: application/json'?
The API docs mentions: 'application/x-www-form-urlencoded'. But I find it much easier to use the JSON. -
Is the 'Update a Swiss tournament' working as intended (or am I a dummy)?
I am getting Cross origin request forbidden every time.
cURL of 'Create a new Swiss tournament' API (working fine):
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer lip_sometoken' \
--data '{
"clock": {
"limit": 300,
"increment": 3
},
"nbRounds": 5
}'```
cURL of 'Update a Swiss tournament' API (not working):
```curl --location 'https://lichess.org/api/swiss/sometournament/edit' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer lip_sometoken \
--data '{
"clock": {
"limit": 300,
"increment": 3
},
"nbRounds": 5
}'```
Already thankful for the help.