-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API endpoint to request contents of multiple files simultaniously #34139
base: main
Are you sure you want to change the base?
Conversation
…itea into feat/multiple-files-api
Some thoughts in my mind:
|
|
HTTP QUERY is a proposed standard to solve the GET-with-body problem. Tooling support is probably not there yet, but if it works in your case, it might be an option to use it already. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- IIRC, the HTTP spec says or has said that GET requests should not contain a body - that's why it isn't an option. Post is the next best choice I think.
I see, I missed the Files []string
field, it would be quite large so it is POST's job.
Adds an API POST endpoint under
/repos/{owner}/{repo}/files
which receives a list of paths and returns a paginated list of the contents of these files.This API endpoint will be helpful for applications like headless CMS (reference: sveltia/sveltia-cms#198) which need to retrieve a large number of files by reducing the amount of needed API calls.