httpwg / http-extensions

HTTP Extensions in progress
https://httpwg.org/http-extensions/
447 stars 146 forks source link

QUERY-enabled Server Online #2893

Closed hawkinsw closed 2 months ago

hawkinsw commented 2 months ago

Hello everyone!

I wasn't sure where else to post this for people who are interested. If here is not the right spot for what I am posting, please feel free to close and move on -- and, of course, accept my apologies.

I have been working on adding support for QUERY to freenginx. As it stands, I have added support for the QUERY method. That alone, did not provide anything really useful so I wrote a module that would roughly emulate the examples in the current draft. The module is a front end for a SQLite database.

The server is running on query.obs.cr and you can use curl to make QUERY requests. There are three tables available now in the database: ietf, contacts and contact (sic).

The schema for ietf is

CREATE TABLE ietf (wg_name text, wg_descr text);

The schema for contact is

CREATE TABLE contact ("name" text, "handle" text);

and the schema for contacts is

CREATE TABLE contacts (surname text, givenname text, email text);

The tables contain only little bits of data and the data attempts to match the examples in the draft:

ietf: wg_name wg_descr
httpbis HTTP working group
contacts: surname givenname email
Smith John john.smith@example.org
Jones Sally sally.jones@example.org
Dubois Camille camille.dubois@example.org
contact: name handle
will hawkinsw

(Sorry, I had to throw myself in there somehow!)

The server currently works by extracting the final part of the URI's path and treating that as the name of the table to complete the SQL query embedded in the body of the QUERY request (like several of the draft's examples). So, if you wanted to see how it looks, you can use curl

$  curl -X QUERY https://query.obs.cr/this/is/contact/ -d "select name, handle"
$  curl -X QUERY https://query.obs.cr/is/contact/ -d "select name, handle"

and

$  curl -X QUERY https://query.obs.cr/contact/ -d "select name, handle"

will all result in

will,hawkinsw,

If anyone is interested in knowing more about this lark, please let me know! I would be more than happy to share. If you think that there are things that would be good to add, please let me know that, too! I am more than happy to add anything that would be helpful. My plan is to put something like this description on https://query.obs.cr but that might not be done before Monday. So, I wanted to post this here.

Thanks for all the work that you all are doing!

Sincerely, Will

reschke commented 2 months ago

Thanks for the feedback, but this place really is for issue tracking.

A better place would be the Working Group's mailing list:

https://lists.w3.org/Archives/Public/ietf-http-wg/

hawkinsw commented 2 months ago

Thanks for the feedback, but this place really is for issue tracking.

A better place would be the Working Group's mailing list:

https://lists.w3.org/Archives/Public/ietf-http-wg/

Thank you! I will send there.

I apologize for adding here -- I had emailed you with a status on this work previously and didn't want to bother you again so I thought here would make a better place.

Sorry again.