How to provide filename for the file which is getting downloaded using Raw url

We are trying to use the Gitlab Raw file path in our automation pipeline to download a single file from gitlab repo using Private_Token.
The process is able to download the file from gitlab using raw url however its named as raw. How can I change the name of this file to the name same as the file I am downloading from repo while downloading itself. e.g. deploy_windows_agent.ps1.

Raw URL : gitlab file download rename issue

How does your automation work exactly? The filename is part of the request URL, so when saving it you can pass the same filename (for curl this would be via -o <path/name>)

The response returned by the endpoint also carries headers x-gitlab-file-path and x-gitlab-file-name in it if you lose the context of the filename in the URL at the point of request.