Skip to content

Instantly share code, notes, and snippets.

@bshambaugh
Last active April 24, 2017 01:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bshambaugh/29c51503882038202ec0d68a0096d076 to your computer and use it in GitHub Desktop.
Save bshambaugh/29c51503882038202ec0d68a0096d076 to your computer and use it in GitHub Desktop.
Twinql: Query from Agent
Query from Agent: POST
XHR
https://databox.me/,query [HTTP/2.0 200 OK 148ms]
Headers
POST
Response
Call Stack
throughAgent http://127.0.0.1:8081/public/app.js:65:3
runQuery http://127.0.0.1:8081/public/app.js:103:3
<anonymous>
Calls: https://github.com/dan-f/twinql/blob/master/public/app.js
--- @dieu
... When you’re using the agent, all requests are sent through a proxy-like server (the agent)
that also handles authentication for you (using WebID-TLS delegation for now).
-- @danf
....The "query from server" button POSTs the query to a web server which then does that exact same work,
but on your behalf, and responds back to you with the result of the query.
The other main benefit is that the client doesn't have to ingest all the graphs followed during link
following which may be very large, even if it's only interested in a small piece of the graph
--- @danf
... If you run it from a server, that server of course uses GETs, but you need to POST the query to that
server for it to parse it from the body.
@bshambaugh
Copy link
Author

This is what happens when the Query from Agent button is clicked.

@bshambaugh
Copy link
Author

I was observing the call stack and how it matched with what Dan and Andrei said should happen.
And they appear to match.

@bshambaugh
Copy link
Author

quoa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment