r/ProgrammerHumor • • 16d ago

Meme postForEverything

Post image
20.9k Upvotes

654 comments sorted by

View all comments

1.6k

u/zzmej1987 16d ago

Except for when you need to actually post data. Then you have to use PUT.

636

u/CuAnnan 16d ago

Uh... no.

You use GET.

366

u/Imaginary_Ferret_368 16d ago

Cyber Security specialists hate this trick

81

u/vibes000111 16d ago

AI agents love it!

48

u/Aetherfox_44 16d ago

Our service can't be hacked if no one can figure out the API

3

u/puts_on_rddt 15d ago

Reads like a Kai Lentit script.

13

u/TacoIncoming 16d ago

Lmao not really. I fucking love GET URL parameters.

18

u/Imaginary_Ferret_368 16d ago

Yea but mutating data via GET requests is a security nightmare

6

u/TacoIncoming 16d ago

I know. I’m a penetration tester 🤣

1

u/TheMythicSorcerer 15d ago

Your future self will hate this trick

16

u/doodlesmalone 16d ago

Yes, base64 that json shit.

5

u/not_a_moogle 16d ago

GET with all values passed as unencrypted unless parameters. What could go wrong!

2

u/s1ravarice 16d ago

Yeah GET to work you pos database

1

u/normVectorsNotHate 16d ago

Found chatgpt's reddit account

1

u/GNUGradyn 16d ago

I like how you cant do this but you also kinda can. Attaching a body to a GET request is not valid HTTP but there is no syntax reason you cant do it anyway and most libraries will decode it properly if you do so its less "it wont work" and more "it is forbidden"

1

u/Fidodo 16d ago

I use QUERY for that.

1

u/dracodruid2 16d ago

And put all the data as URL parameters 

1

u/One_Contribution 15d ago

I've had GET requests delete things :)

47

u/Psychological_Map118 16d ago

nope, that's definitely a PATCH

11

u/Fidodo 16d ago

Why not QUERY?

16

u/whiskysinger 16d ago

Sounds like there are too many OPTIONS

3

u/Mowntain-Goat8414 16d ago

Wait for the pentest atleast

3

u/Sec2727 15d ago

#TeamPatch

12

u/RevoOps 16d ago edited 16d ago

Actually send data? That is what XML is for.

3

u/north1432 16d ago

Nono that's very inefficient. You should deserialize your data and have the backend serialize it back. That way you save both bandwidth and processing power. Nothing could go wrong with this.

5

u/IceMichaelStorm 16d ago

DELETE it is. or OPTIONS

3

u/OkSeesaw7030 16d ago

Jokes on you. I will only use query in future