wix-fetch get with basic authorization

I just found out something. I added some console.logs, and in the function ist seams the encoding doesn’t work. It gives back the username and password correctly:

Look at the code in the comment below, that’s the code now. When I test this function on it’s own, it works correct:
exportfunction encodeKeys ( user , key ){ let encodedSecret = btoa ( user +“:”+ key ); return encodedSecret ;}

Only in the function itself, it won’t encode.