curl basic auth using base64 encoded credentials

Vim includes an invisible EOL character in text files, which can cause problems if, like me, you are piping the contents of the file to base64 to supply basic auth credentials. This post describes 2 ways to create such a text file so that it does not include the extraneous EOL character.