Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Params are not URI encoded #205

Open
OliverJAsh opened this issue May 22, 2023 · 1 comment
Open

Params are not URI encoded #205

OliverJAsh opened this issue May 22, 2023 · 1 comment

Comments

@OliverJAsh
Copy link
Member

OliverJAsh commented May 22, 2023

Given:

unsplash.photos.get({ photoId: 'foo/bar' });

Expected: request to /photos/foo%2Fbar
Actual: request to /photos/foo/bar

Note: some usages of getPathname rely on this behaviour:

https://github.com/unsplash/unsplash-web/blob/330bb40640c3e1d3600ecc5a1b15a244013f0c5a/app/services/api/Photo/index.ts#L36C1-L37

@OliverJAsh OliverJAsh changed the title Photo ID/slug param is not URI encoded Params are not URI encoded Jul 28, 2023
@OliverJAsh
Copy link
Member Author

This most likely affects other endpoints, in addition to /photos.

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

No branches or pull requests

1 participant