Sometimes doing HTTP operations it’s required to provide some extra headers. For example, talking to JFrog Artifactory requires the
X-JFrog-Art-Api header w/ API key.
I propose to add
EXTRA_HEADERS <string>... named parameter to the
file(UPLOAD|DOWNLOAD ...) signature.
P.S. I’m ready to make an MR for this.
P.S.S. The other thing that will be nice to have is a configurable HTTP method to be able to talk to various REST APIs. For example, upload could be done via
CREATE, or even
PATCH methods. There is HTTP
DELETE method which is also nice to have (e.g. to delete files from Artifactory repos), but currently I’ve got no clear idea how to extend
file signature for this.