mirror of
https://github.com/tcgdex/javascript-sdk.git
synced 2025-07-29 00:49:51 +00:00
Added URL URLs Normalization
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
@ -71,6 +71,9 @@ export default class TCGdex {
|
||||
}
|
||||
|
||||
private rwgr<T = any>(...url: Array<string | number>) {
|
||||
return RequestWrapper.getRequest<T>(`${this.getBaseUrl()}/${url.map((v) => encodeURI(v.toString())).join('/')}`)
|
||||
return RequestWrapper.getRequest<T>(`${this.getBaseUrl()}/${url.map((v) => encodeURI(
|
||||
// Normalize URL
|
||||
v.toString().replace('?', '%3F').normalize('NFC').replace(/["'\u0300-\u036f]/g, "")
|
||||
)).join('/')}`)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user