News for hackers. Stuff that matters.
Re:A new curl option was born: --url-query by csours on Thursday November 10, 2022 @09:47AM (#33547208)
I thought this was going to be about base64 encoded json query param(s) - instead of posting base64 or making a bunch of different params, do a GET with one param of base64 encoded json. Easy for the client, easy for the server, easy to share, only downside that I see is that it makes things a bit obtuse for users, but an extension or browser affordance could fix that.
Re:A new curl option was born: --url-query by rpastuszak on Thursday November 10, 2022 @10:29AM (#33547858)
If you're into this stuff, you might enjoy my "Twitter as a CDN tool", here's pong in a single Tweet: https://twitter.com/rafalpast/status/1316836397903474688

> Easy for the client, easy for the server, easy to share, only downside that I see is that it makes things a bit obtuse for users

There are more downsides:

- processing and creating payload can be harder are you're passing plaintext w. ca. 30% size increase on average

- base64-encoded assets (e.g. SVGs) would cause a huge performance drop in WebKit (this probably has improved since the last time I ran benchmarks).

- since you're encoding content and not its location, you can't easily update the underlying resource (hence to update my version of Pong, I'd need to create a new unique URL). IIRC IPFS suffers (used to?) from a similar issue

- not an issue now, but still was 1-2 years ago: some browsers would allow only for 2 or 4kb of text in URL

Re:A new curl option was born: --url-query by csours on Thursday November 10, 2022 @10:55AM (#33548278)
Hah, that Twitter thing is neat.

> not an issue now, but still was 1-2 years ago: some browsers would allow only for 2 or 4kb of text in URL

Yes, I had in mind smaller payloads, things that would have been query params on a GET

Re:A new curl option was born: --url-query by r_c_a_d on Thursday November 10, 2022 @10:34AM (#33547927)
Yes, I think this is how Wordle did the migration to NY Times without losing game history. The original site did a redirect to nytimes.com/something/wordle?data=X where X was the game history. Quite clever, I thought.
Re:A new curl option was born: --url-query by cagmz on Thursday November 10, 2022 @11:20PM (#33557273)
Does this technique have a name?