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

Include hyper-gateway version number in responses #9

Closed
josephmturner opened this issue Mar 2, 2023 · 8 comments
Closed

Include hyper-gateway version number in responses #9

josephmturner opened this issue Mar 2, 2023 · 8 comments

Comments

@josephmturner
Copy link
Contributor

This would allow us to ensure that we're using the latest version.

@RangerMauve
Copy link
Owner

Yeah, it'd be cool to return a JSON file on a GET to /. Maybe it could also give the info about the hypercore-fetch and hyper-sdk versions.

@josephmturner
Copy link
Contributor Author

Yeah, it'd be cool to return a JSON file on a GET to /.

With a special GET request header, right? The behavior of GET on / is already defined: JSON array of top-level contents.

Alternatively, would it be too much overhead to send X-HYPER-GATEWAY-VERSION and X-HYPERCORE-FETCH-VERSION headers with every response?

@RangerMauve
Copy link
Owner

GET on / isn't the JSON array of files. That's a GET on /hyper/key/

So we should be able to put whatever we want in there.

@josephmturner
Copy link
Contributor Author

My mistake. Okay - this sounds good to me!

@josephmturner
Copy link
Contributor Author

Also, it appears that hyper-gateway --version returns "unknown". If you like, I can make a separate issue about this!

@RangerMauve
Copy link
Owner

Added in 3.3.0

@RangerMauve
Copy link
Owner

Try accessing http://localhost:4973/

@josephmturner
Copy link
Contributor Author

Works great! We added a function in hyperdrive.el which uses this.

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

No branches or pull requests

2 participants