Skip to content
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

Add reitit-frontend support for fragment string #581

Merged
merged 2 commits into from
Feb 21, 2023

Conversation

Deraen
Copy link
Member

@Deraen Deraen commented Jan 18, 2023

Reworks #554 to a more generic version.

It is enough that we read the fragment as a string. Users can use Malli coercion with :decode/string to decode the fragment values e.g. for the OAuth use-case.

There shouldn't be a need for Reitit to provide a function to split those values either, OAuth RFC specifies application/x-www-form-urlencoded format, which is supported by ring.util.codec/decode-form on Clojure and e.g. URLSearchParams on JS environments.

Malli test case shows how to decode the string to a map.

Blocked by malli

@Deraen Deraen force-pushed the add-support-for-fragment-parameters-2 branch from bac9115 to a9980b4 Compare January 18, 2023 18:36
@Deraen Deraen changed the title Add support for fragment string Add reitit-frontend support for fragment string Jan 18, 2023
@Deraen Deraen force-pushed the add-support-for-fragment-parameters-2 branch from a9980b4 to e89cebe Compare January 18, 2023 18:48
@ikitommi
Copy link
Member

[metosin/malli "0.10.1"] should have the fix.

…t-for-fragment-parameters""

This reverts commit 4d1b00e.
@Deraen Deraen force-pushed the add-support-for-fragment-parameters-2 branch 2 times, most recently from c2ac4bc to 263dfd1 Compare February 16, 2023 10:25
Users can use Malli decoding to control decoding per schema.
@Deraen Deraen force-pushed the add-support-for-fragment-parameters-2 branch from 263dfd1 to 2494f70 Compare February 16, 2023 11:13
@ilmoraunio ilmoraunio merged commit 310dcd0 into master Feb 21, 2023
@ilmoraunio ilmoraunio deleted the add-support-for-fragment-parameters-2 branch February 21, 2023 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants