harshdoshi999 / node-url-shortener

7 stars 1 forks source link

Query Parameter is not allowed? #3

Closed ArcherEmiya05 closed 2 years ago

ArcherEmiya05 commented 3 years ago

It seems that query params are not allowed/supported.

harshdoshi999 commented 3 years ago

@ArcherEmiya05 what you trying to do? Please do share your proper code example.

ArcherEmiya05 commented 3 years ago

@ArcherEmiya05 what you trying to do? Please do share your proper code example.

Query in URL is not included in short link Example link is https://adrenture-app.web.app/getList?&idToken=eyJhbGciOiJSUzI1NiIsImtpZCI6IjY5NmFhNzRjODFiZTYwYjI5NDg1NWE5YTVlZTliODY5OGUyYWJlYzEiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vYWRyZW50dXJlLWFwcCIsImF1ZCI6ImFkcmVudHVyZS1hcHAiLCJhdXRoX3RpbWUiOjE2MDc5OTcyMzEsInVzZXJfaWQiOiJuMVU5cHhTa043WXBRY2Y1M1NUSXUyVmpkakgzIiwic3ViIjoibjFVOXB4U2tON1lwUWNmNTNTVEl1MlZqZGpIMyIsImlhdCI6MTYwNzk5NzIzMSwiZXhwIjoxNjA4MDAwODMxLCJlbWFpbCI6ImFkcmVudHVyZS5hZG1pbkBhZHJlbnR1cmUuY29tIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJmaXJlYmFzZSI6eyJpZGVudGl0aWVzIjp7ImVtYWlsIjpbImFkcmVudHVyZS5hZG1pbkBhZHJlbnR1cmUuY29tIl19LCJzaWduX2luX3Byb3ZpZGVyIjoicGFzc3dvcmQifX0.catw-dwjt9gIOb&collection=Users&page=1

Only https://adrenture-app.web.app/getList? is return from the shortened link

harshdoshi999 commented 3 years ago

Hi @ArcherEmiya05 , I'll look into it and release new version soon.

JasonLeviGoodison commented 3 years ago

Hey following up on this. Need to include a query param and getting blocked

karthik666manjunath commented 2 years ago

Hey. Any update on the query parameter ?

bdodroid commented 2 years ago

@karthik666manjunath

I was able to get around this by encoding the url, e.g:

shortUrl.short(encodeURIComponent("https://url.com/test?test=test&alsoTest=test"), function (err: any, url: String){ console.log(url); });

karthik666manjunath commented 2 years ago

Let me try this. Thanks !

harshdoshi999 commented 2 years ago

Thanks @bdodroid. Fixed this in version >=2.0.2 @karthik666manjunath