Working with the GitLab API

I'm unable to read or write files to a private GitLab repository via the API. I can successfully do both using curl in the terminal, but not through the http request module or the GitLab GetRepositoryFile or CreateRepositoryFile nodes.

I would want to translate this:

curl "https://gitlab.rrz.uni-hamburg.de/api/v4/projects/1233/repository/files/progress%2ftest1.json?ref=api-tests" \
  -H "PRIVATE-TOKEN: *myPrivateToken*"

command into something that works in Node-RED.

The curl command gives me the file, this flow:

[{"id":"4200e72a.d60038","type":"http request","z":"561543e8.1c2c5c","name":"Create GitLab Test File","method":"use","ret":"txt","paytoqs":false,"url":"https://gitlab.rrz.uni-hamburg.de/api/v4/projects/1233/repository/files/progress%2ftest1.json?ref=api-tests","tls":"","persist":false,"proxy":"","authType":"","x":600,"y":180,"wires":[["6a2253c8.870cbc"]]},{"id":"cbda67bf.d3b868","type":"inject","z":"561543e8.1c2c5c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":220,"wires":[["7ac1d7b6.f8a478"]]},{"id":"6a2253c8.870cbc","type":"debug","z":"561543e8.1c2c5c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":800,"y":220,"wires":[]},{"id":"7ac1d7b6.f8a478","type":"function","z":"561543e8.1c2c5c","name":"","func":"msg.method='GET'\nmsg.headers = {};\nmsg.headers['PRIVATE-TOKEN'] = '*MyPrivateToken';\nreturn msg;","outputs":1,"noerr":0,"x":360,"y":220,"wires":[["4200e72a.d60038","6a2253c8.870cbc"]]}]

gives me a 401 unauthorized.

I can, however, get files from public repositories without using the token in the header, so I guess the problems stems from there somehow.