Ensures API requests end in a trailing slash
Is a format string sensible? I think in this case it's more sensible to just append a '/', although I don't know TypeScript
This seems very wrong. Shouldn't this be done by creating a dictionary and setting a key if the token is present?