Anything going to the ...
argument is interpreted as a curl option. You need to put parameters as a list in the httpheader
argument. See documentation.
Try something like:
getURL("https://api.example.com/resource",
userpwd ="username:password",
httpheader=list(param1="value",param2="value"))