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 helper for getting parameters from requests #827

Closed
wants to merge 1 commit into from

Conversation

pscott
Copy link
Contributor

@pscott pscott commented Jan 24, 2020

Issue Addressed

Fixes #825

Proposed Changes

In #825 we stated that parameters were too loose (you can for example call /beacon/head?state=0&foo=bar

This PR implements some helper tools to fix that.
I struggled to find a more simple way to implement that. This seems like a bit of over-engineering, and if someone has a better way of implementing it I'd be happy to start all over again!

Additional Info

  • Implement get_params and other helpers
  • Add additional tests
  • Remove actual "first_of" and other parameter getters
  • Add macros to clean up code
  • Remove Strings and clones as much as possible

@paulhauner
Copy link
Member

I'm going to close this since it's a long running draft and I assume Scott is busy with other things (and rightly so).

@paulhauner paulhauner closed this Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parameters too loose on API calls
2 participants