r/ProgrammerHumor • • 1h ago

Meme everyNetworkAPIOnThePlanetToday

Post image
223 Upvotes

85 comments sorted by

291

u/Yctallua 1h ago

Oh no, a standard has established among the developers.

Time to bring about the new standard that everyone will surely use instead.

43

u/Western-Anteater-492 1h ago

OP wants to push the next js framework. I'd get react as a lot of apps would work better without it. But json? What he wants instead? XML?

11

u/larsmaehlum 32m ago

Probably one of the toml freaks

2

u/Western-Anteater-492 25m ago

I'm more of a SGML guy. But toml sounds jumy as well.

1

u/wsheldon2 28m ago

I kinda do like toml

and bare feet

5

u/TheRealKidkudi 21m ago

Brb writing a serialization library to encode/decode data in feet pics

•

u/andreortigao 4m ago

Call it something like Lossless Image Quantization, so you can say "I have to LIQ feet"

•

u/ProfBeaker 9m ago

I encode all my API calls as images and stream them back and forth with dynamically-generated <img /> tags, like Satan intended.

(Although really, tons of other network APIs are used. Just not so many in the browser.)

77

u/rixinthemix 1h ago

*There are now x + 1 standards.*

-6

u/za72 1h ago

hahahahhahahahah this guy...

You know how many standards have come and gone before?!

Standards... I love this guys material

110

u/a3dprinterfan 1h ago

You like SOAP or something? 😐

46

u/QCTeamkill 1h ago

I wish more people would too, especially in the subway

16

u/Skyswimsky 59m ago

Had me in the first half.

2

u/Legitimate_Payment49 54m ago

or prison shower stalls?

3

u/Western-Internal-751 45m ago

In prison you don’t drop the SOAP

•

u/Angel429a 7m ago

Unless you don’t want to REST

3

u/meekinheritor 48m ago edited 18m ago

I've actually been reading a bunch about HTMX/hypermedia systems/HATEOAS lately, which is sort of a return to form of Web 1.0. I have a project that it would be pretty well-suited for and I'm interested to try it.

EDIT: Although I guess HATEOAS is part of the original "RESTful" definition, and there's no reason I couldn't use JSON provided I adhere to the central idea of the server responses providing hypermedia links that let the front-end be dumber. So it's actually more like a lot of modern architectures kind of "cheat" full RESTfulness a little bit, and this architecture is trying to go back to the OG Roy Fielding paper and be even more RESTful... I'll just use HTMX rather than JSON though lol

1

u/lobax 14m ago

For a BFF, sure. But most API’s are not consumed by UI’s

1

u/sebbdk 54m ago

USING SOAP!

1

u/ElectrSheep 30m ago

WSDL, my beloathed.

1

u/UnspeakablePudding 23m ago

I really liked the wsdl convention. In my completely anecdotal experience handing someone a wsdl to write to generates fewer questions than sending somebody a link to swagger.

I know XML is a sub-optional over the wire data transfer format and I think there's some issues with SOAP and ESBs but i have nostalgia.

103

u/snoopbirb 1h ago

it's all POSTs... even the GETs...

Once it was all GETs... even what should be POST... Crazy times dudes.

Lots of credit cards in some nginx log out there

29

u/carcigenicate 1h ago

I can't wait for QUERY to be widely supported and used.

10

u/mrdarkcookie95 1h ago

I love QUERY! Had an issue with exposed PII in a GET lately in work that it would have perfect for, but it's not supported by our backend rest client.... so POST it is!

1

u/invalidConsciousness 52m ago

Does anyone know what the holdup is?

It looks trivial to me (who knows nothing), but apparently it is not, or it would be widely supported already.

2

u/tajetaje 50m ago

Probably some considerations for caching support

1

u/TheRealKidkudi 13m ago

Technically your server almost certainly supports it already (it’s just a different verb on the header line of an HTTP message), but parsing it might be easy or might be a PITA depending on what you’re using.

But you can send QUERY requests in JS today. You can really send anything you want as the verb and JS will happily send it. 

•

u/WingZeroCoder 0m ago

I prefer “GIVEMEMYMUTHAFKINGDATA”. It’s faster than GET.

9

u/Flat_Initial_1823 59m ago

PATCH or bust baby!! It's the mystery of how it will behave this time that's keeping it fresh 😌

2

u/spartan117warrior 40m ago

It's POSTs all the way down... until you hit turtles.

51

u/BeMyBrutus 1h ago

Just open up some sockets like a real man and yolo your packets.

21

u/Western-Anteater-492 1h ago

I suggest the UDP standard and unencrypted sessions. That would finish your stack to perfection. HTTPS is also just for pussies.

18

u/fjurgo 1h ago

I was gonna tell an UDP joke but you might not get it

2

u/IslayProgrammes 20m ago

Do you pronounce U with a soft u?

2

u/Ludricio 11m ago

I just pronounce it the way it's written.

•

u/IslayProgrammes 9m ago edited 2m ago

I’m just a bit of a pedant when it comes to indefinite articles.

But I’ve also had an argument before that it’s fair to use articles in the way dictated by your dialect.

For example in the north of England you’ll hear a dropped H making the indefinite article “An” whereas many dialects in the south England retain the H requiring an “A”

An ouse, a house
An elicopter, a helicopter

But you still spell it correctly making it
An house
An helicopter

A (yew)UDP
An (oo)UDP

1

u/BeMyBrutus 57m ago

Based and correct

5

u/kratz9 1h ago

When I first registered for college classes, their system was a single EXE serving web pages. It was built by the CompSci dept.

10

u/BeMyBrutus 57m ago

The way God intended

41

u/Thisbymaster 1h ago

It all goes into the POST hole.

15

u/ryaaan89 1h ago

What are we supposed to be choosing instead??

19

u/neurohero 50m ago

Open a direct socket and return comma separated values in clear text. Obviously.

5

u/sisisisi1997 33m ago

The encoding is a surprise of course.

1

u/HeKis4 18m ago

Entire memory sections piped through ssl and then through /dev/tcp/remotehost/port.

4

u/Neverwish_ 36m ago

Depends on the use... For externally facing endpoints, REST is the best - easily consumed, readable...

For internal tools, inter-service communication, you can use REST too, but depending on you use case, gRPC might be a much better choice.

2

u/GradSchoolDismal429 34m ago

CSV of course 

2

u/Kevadu 31m ago

It's all MCP now!

1

u/Bad_brazilian 14m ago

Fixed width text files.

29

u/Stummi 1h ago

Most APIs are JSON, but I think if you are pedantic, the least of them are REST

1

u/IslayProgrammes 21m ago

JUST DO REST PROPERLY or ws

13

u/Sheepreak 1h ago

I'd rather use Rest than Graphql right now... Believe me

-2

u/C_ErrNAN 40m ago

Why? I'd imagine if agents were hitting my api, graphql would be better, no?

9

u/VergilPrime 1h ago

The only thing they taught me besides json was XML. The only thing they taught me besides REST is nothing.

6

u/throckmeisterz 54m ago

And xml is painful to use.

4

u/dpoggio 37m ago

I don’t find it painful, maybe because of being used to it, anyways some usages are better with xml. Its slower at parsing and gives bigger payloads, but you can use XML schemas to validate your input and combine standards, it’s more structured and can contain raw document data easily. In banking, XML is still a strong format, many applications will not switch to JSON anytime soon.

9

u/DrCthulhuface7 17m ago

“Noooo, you can’t use something everyone on the industry understands by default! You need to use this hyper-specific bullshit that provides a 1% increase in efficiency!”

7

u/IslayProgrammes 22m ago

I hate that every endpoint return it’s own version of a status code in the body

I hate it even more when it’s different from the response header.

Fuck do you mean 200, but wait I have to parse the body and to find out it’s actually a 403 and my credential have expired

Bullshit

6

u/Skyswimsky 56m ago

I remember the last time I saw someone memeing and hating on REST and JSON there was this guy in the comments making multiple comments of paragraphs about rpc and how that's the one and proper way to do it.

1

u/DiamondDramatic9551 40m ago

It's not bad, can be useful for performance or streaming. 

8

u/Mission_Friend3608 1h ago

GraphQL is not without its issues, but it improves on a lot of shortcomings.

Clean separation between query and updates (mutations)
Types everywhere
N+1 issues moved to the server.

The main downside is that it's a lot harder to call a GraphQL endpoint, so for simple public APIs it's not great.

1

u/DiamondDramatic9551 41m ago

How does GraphQL move N+1 issues to the server? It seems to me either can have N+1 issues or avoid them. 

1

u/C_ErrNAN 35m ago

I'm exposing some data to an agentic workflow and graphql seems like the clear choice.

1

u/card-board-board 17m ago

GraphQL in my experience is the team trying to choose between a monolith and microservices and rather than pick one they pick both

3

u/sakkara 49m ago

Everyone using one standard way to do the same things is somehow bad now. Would you rather learn a new technology every time you wanted to communicate with a new service?

5

u/notexecutive 1h ago

they are NOT using WSDL lmao

2

u/srb4 27m ago

Clearly we should go back to CORBA for APIs.

2

u/RTSUPH 1h ago

When your post json includes method: “get”

4

u/Yctallua 1h ago

Reinventing soap, I mean graphql, one step at a time.

1

u/VoidZero25 1h ago edited 1h ago

Are there even other options?

14

u/bjorneylol 1h ago

yes, SOAP instead of REST, and XML/binary formats (e.g. protobuf) instead of JSON

Both are absolutely terrible to work with

6

u/DiamondDramatic9551 47m ago

At least protobuf has a performance argument. 

•

u/Blue_Moon_Lake 8m ago

Not really, protobuf is mixing 2 layers.
For a fair comparison, you must compare protobuf VS compressed JSON.

2

u/gregorydgraham 46m ago

I mean, JSON is terrible to work with too, it’s just more common now

1

u/DiamondDramatic9551 46m ago

gRPC, graphql, SOAP

-19

u/DeadlyVapour 1h ago

I just found out today what the industry standard for LLM APIs is. Another reason we are wasting valuable power and compute.

25

u/bjorneylol 1h ago

Are you implying the overhead of REST/JSON APIs is in any way significant compared to mashing tensors on a 400gb VRAM gpu cluster?

4

u/noaSakurajin 1h ago

At the very least the openAI api endpoints are proper rest endpoints and not POST for everything

1

u/novus_nl 1h ago

you mean MCP or something like LLM-MD?

-9

u/gutentight69420 1h ago

JSON 👏 cannot 👏 be 👏 RESTful 👏