Skip to content

URL has a trailing "/" when calling server #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Selid opened this issue May 26, 2025 · 0 comments
Open

URL has a trailing "/" when calling server #199

Selid opened this issue May 26, 2025 · 0 comments

Comments

@Selid
Copy link

Selid commented May 26, 2025

Good Morning,

I'm trying to setup the librairy to call my server, the trick is that the token I need will be in the url of the web-app, so I can't set it up when bootstraping, I need to wait until everything is initialized.

So in my service I have :
const sockConfig: SocketIoConfig = { url: http://${config.url}:${config.port}, options: { query: { mock: true }, path: /token/${token}, withCredentials: false, autoConnect: false } } console.log(sockConfig.url) this.socket = new Socket(sockConfig); console.log(this.socket); this.socket.connect();

And in the browser the url called became http://localhost:4200/token/XXXX-XXXX-XXXX-XXXX-XXX/?mock=true. My issue is the / between the token part and the parameters that comes from nowhere.

Any idea ? Is that a feature ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant