-
-
Notifications
You must be signed in to change notification settings - Fork 320
Open
Labels
type:featureChanges add a new featureChanges add a new feature
Description
Description
The GitLab API has support for sending a HEAD request to get only metadata.
https://docs.gitlab.com/api/repository_files/#get-file-metadata-only
This is useful when you want to check for the existence of a file without having to download it.
Proposal
The first steps would be adding HEAD support to the RequestHelper class.
After that, the implementation for various endpoints would need to be done. eg: RepositoryFiles.show and RepositoryFiles.showRaw, maybe more.
There are 2 ways I can think of implementing this.
- Add a flag to the options for the respective functions such as
metadataOnly. This would make the type safety a bit trickier to do right. - Create new methods. eg:
RepositoryFiles.showMetadataandRepositoryFiles.showRawMetadata
Checklist
- I have checked that this is not a duplicate issue.
- I have read the documentation.
jdalrymple
Metadata
Metadata
Assignees
Labels
type:featureChanges add a new featureChanges add a new feature