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

API query endpoint return html #213

Open
mshiner opened this issue Aug 23, 2023 · 1 comment
Open

API query endpoint return html #213

mshiner opened this issue Aug 23, 2023 · 1 comment

Comments

@mshiner
Copy link

mshiner commented Aug 23, 2023

The cli for sqlite has an output .mode of HTML to allow returning an HTML representation of a select statement.

This maybe a mad idea but I think it'd be cool if the /query endpoint of the dbhub.io api could do the same thing with the option to turn headers on or off.

The reasoning is that this would be a good fit when using HTMX which expects an endpoint to return an html fragment rather than json.

@justinclift
Copy link
Member

@mshiner Apologies, we somehow completely missed several issues filed in this repo.

The concept you're suggesting here would probably not be to tooo hard to implement.

Maybe something like having an optional parameter for the query endpoint to specify the return format, plus figuring out what kind of html structure would be suitable.

That being said, there are a bunch of other higher priority things to get some first (showing user usage info, implement some kind of monthly subscription thing, etc), so it'll be a while until we look at the idea properly.

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