@@ -49,7 +49,7 @@ Note that `/users/:name/tokens` is a special endpoint and requires you
4949to authenticate using ` BasicAuth ` and a password, as follows:
5050
5151``` sh
52- $ curl -XPOST - H " Content-Type: application/json" -k -d ' {"name":"test"}' -u username:password https://gitea.your.host/api/v1/users/< username> /tokens
52+ $ curl -H " Content-Type: application/json" -k -d ' {"name":"test"}' -u username:password https://gitea.your.host/api/v1/users/< username> /tokens
5353{" id" :1," name" :" test" ," sha1" :" 9fcb1158165773dd010fca5f0cf7174316c3e37d" ," token_last_eight" :" 16c3e37d" }
5454```
5555
@@ -58,7 +58,7 @@ plain-text. It will not be displayed when listing tokens with a `GET`
5858request; e.g.
5959
6060``` sh
61- $ curl --
request GET -- url https://yourusername:
[email protected] /api/v1/users/
< username
> /tokens
61+ $ curl --url https://yourusername:
[email protected] /api/v1/users/
< username
> /tokens
6262[{" name" :" test" ," sha1" :" " ," token_last_eight:" ........" :},{" name" :" dev" ," sha1" :" " ," token_last_eight" :" ........" }]
6363` ` `
6464
@@ -70,7 +70,7 @@ is where you'd place the code from your authenticator.
7070Here is how the request would look like in curl:
7171
7272` ` ` sh
73- $ curl -H " X-Gitea-OTP: 123456
" --request GET -- url https://yourusername:[email protected] /api/v1/users/yourusername/tokens73+ $ curl -H " X-Gitea-OTP: 123456
" --url https://yourusername:[email protected] /api/v1/users/yourusername/tokens7474` ` `
7575
7676You can also create an API key token via your Gitea installation' s web
@@ -96,7 +96,7 @@ Authorization: token 65eaa9c8ef52460d22a93307fe0aee76289dc675
9696In a ` curl` command, for instance, this would look like:
9797
9898` ` ` sh
99- curl -X POST " http://localhost:4000/api/v1/repos/test1/test1/issues" \
99+ curl " http://localhost:4000/api/v1/repos/test1/test1/issues" \
100100 -H " accept: application/json" \
101101 -H " Authorization: token 65eaa9c8ef52460d22a93307fe0aee76289dc675" \
102102 -H " Content-Type: application/json" -d " { \" body\" : \" testing\" , \" title\" : \" test 20\" }" -i
0 commit comments