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

Support Height Queries in REST Client #4501

Closed
2 of 4 tasks
alexanderbez opened this issue Jun 6, 2019 · 1 comment · Fixed by #4505
Closed
2 of 4 tasks

Support Height Queries in REST Client #4501

alexanderbez opened this issue Jun 6, 2019 · 1 comment · Fixed by #4505
Assignees
Milestone

Comments

@alexanderbez
Copy link
Contributor

alexanderbez commented Jun 6, 2019

Summary

Height queries are now supported in the CLI client via #4382. A similar solution needs to be supported for the REST client.

Namely, each appropriate GET query endpoint will accept a height query param and this value is then passed onto the context.

Essentially the following logic will have to be added to each respective handler:

		heightStr := r.FormValue("height")
		if heightStr != "" {
			height, err := strconv.Atoi(heightStr)
			if err != nil {
				// TODO: handler error
			}
			
			cliCtx = cliCtx.WithHeight(height)
		}

But maybe there is a cleaner way we can do this via middleware to reduce the amount of code we need to write.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez alexanderbez added this to the v0.36.0 milestone Jun 6, 2019
@alexanderbez alexanderbez self-assigned this Jun 6, 2019
@alexanderbez
Copy link
Contributor Author

/cc @colin-axner :)

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 a pull request may close this issue.

1 participant