Member-only story
Featured
HTTP Has a New Query Method — And It Could Change How We Build APIs
For years, developers had to choose between GET and POST for complex searches. The new HTTP QUERY method finally gives us a better option.
If you’ve been building APIs for a while, you’ve probably run into the same awkward situation I have more than once.
Imagine you’re building a product search API for an e-commerce application. Users can filter products by category, price range, brand, availability, rating, color, shipping options, and dozens of other conditions. At first, everything looks simple. You expose a GET endpoint, add a few query parameters, and move on.
If you are not a medium member? Read it here
A few months later, the product team asks for more advanced filters. Suddenly your clean URL starts looking like this:
GET /products?category=laptops&brand=apple&minPrice=1000&maxPrice=2500&rating=4&inStock=true&sort=price&page=2&color=silverThen another feature arrives.
Users now want to filter by multiple brands, multiple categories, warehouse locations, discount percentages, shipping speed, and nested conditions like “show me laptops from Apple or Dell that cost less than $2,000…











