DEV Community

HTTP

Recently HTTP got an upgrade, if you are a developer you know what this means. After years of using the same HTTP methods like GET, POST, PUT and DELETE we finaly have a new standardized method called QUERRY

HTTP runs basically in the enter internet evrytime your phone talks to a server it uses GET to fetch something, POST to send something, PUT to update it, DELETE to remove it. That's been the toolkit for like two decades.

so why does this matter, let's sy you are building a search feature. If i just want one user i get request works perfectly, but what if i want all users in an engineering department with the role of admin sortaed alphabetically, filtered by date and split into pages. That request becomes too complex to fit nicely into a url. For years developers have worked aroundby using POST request, even though they are not actually creating anything and POST was never built for reading data it tells the internet "hey i'm changing something so you loose safe retries, cache, all the nice guarantees GET gives you.

So recently the IETF basically they grouped that writes the rule book for the internet, officially STANDARDIZED a brand new menthod called QUERY, you can send complex filters inside the body while still telling the server "hey i'm only reading the data, i'm not modifying anything." This means faster, safer more cacheable searches for basically evry app you use.

now before you rush to replace all your posts search and points don't support for querry is still rolling out. So many frameworks servers and API tools don't fully support it yet. Simple searches should still use GET and if users need to bookmark or share filterd results GET is still the better choice. this is one of those updates that shows the web is still evolving even after two decade

Top comments (0)