5 ms·
> What I meant is GET requests with query strings vs POST requests. Oh, I see. Yes, I would say that, conceptually, Spartan doesn't have GET requests with a qu
by networked 2y ago
> What I meant is GET requests with query strings vs POST requests.
Oh, I see.
Yes, I would say that, conceptually, Spartan doesn't have GET requests with a query; it only has GET without a query and POST.
`=:` is like HTML `<form action="post">`.
If you wanted to add queries to Spartan, you would probably do it without breaking compatibility by parsing the query out of `path-absolute`.
For example:
example.com /weather?city=lisbon&time=tomorrow 0
The downside is that it would drag in part of URL parsing on the server, which the protocol currently avoids.
> However, there is also the consideration of, should you really need so many headers anyways?
I see it not as a matter of number but change over time.
Headers leave room for protocol evolution and extension.
You could also have evolution with protocol versions.
A caveat is that if you ever go from sequential versions like 1.2 to versions that enumerate features like 1.2+foo+bar,
you end up in a similar place to headers.
Compared to headers, you get more flexibility in protocol parsing and a more ad hoc design.
Most of your features probably don't need the flexibility, so you just pay the cost of an ad hoc design.
(For example, `+foo` and `+bar` may each add a field to the request line.
You'd have to make sure they didn't conflict.)
> I have added it to the list of mirrors at the bottom of the file.
Yay.