Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b42642fc
Commit
b42642fc
authored
Oct 28, 2021
by
Guo Shuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix curl shell examples which cause 400 Bad Request.
parent
dfa79015
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
doc/api/repository_files.md
doc/api/repository_files.md
+3
-3
No files found.
doc/api/repository_files.md
View file @
b42642fc
...
...
@@ -185,7 +185,7 @@ POST /projects/:id/repository/files/:file_path
```
shell
curl
--request
POST
--header
'PRIVATE-TOKEN: <your_access_token>'
\
--header
"Content-Type: application/json"
\
--data
'{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname",
\
--data
'{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname",
"content": "some content", "commit_message": "create a new file"}'
\
"https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
```
...
...
@@ -221,7 +221,7 @@ PUT /projects/:id/repository/files/:file_path
```
shell
curl
--request
PUT
--header
'PRIVATE-TOKEN: <your_access_token>'
\
--header
"Content-Type: application/json"
\
--data
'{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname",
\
--data
'{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname",
"content": "some content", "commit_message": "update file"}'
\
"https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
```
...
...
@@ -268,7 +268,7 @@ DELETE /projects/:id/repository/files/:file_path
```
shell
curl
--request
DELETE
--header
'PRIVATE-TOKEN: <your_access_token>'
\
--header
"Content-Type: application/json"
\
--data
'{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname",
\
--data
'{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname",
"commit_message": "delete file"}'
\
"https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment