-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
Lucky::Params and escape hatch methods (from_json/query/form/multipart) #1053
Conversation
Just a simple delegate, but makes it easier to access just the query params if you need to. Part of the plan to add escape hatches to Lucky for more complex scenarios where you need to get the low-level constructs.
f0d49cc
to
168f374
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be nice to get out there
168f374
to
7578a11
Compare
7578a11
to
e25384b
Compare
end | ||
rescue JSON::ParseException | ||
raise Lucky::ParamParsingError.new(request) | ||
private memoize def parsed_json : JSON::Any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? 😂 I didn't know that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup! It looks weird but macros before defs have to go between the private haha
This PR improves documentation in Lucky::Params as well as adds some methods for interacting with the raw data more easily if needed: