SShortSingh.
Back to feed

New HTTP QUERY Method (RFC 10008) Offers Cacheable Requests With a Body

0
·1 views

The IETF formally introduced the HTTP QUERY method in RFC 10008, published in June 2026, filling a long-standing gap between GET and POST for complex read operations. QUERY is safe, idempotent, and cacheable like GET, but also supports a request body, making it suitable for search, filter, and graph queries that exceed URL length limits. A key implementation challenge is caching: RFC 10008 requires the request body to be included in the cache key, since multiple different bodies can target the same URL, and a cache keyed only on method and URL risks serving one client's response to another. Correct body-based cache keying also demands careful normalization, where semantically identical JSON payloads must map to the same key while genuinely different payloads must not collide. A small open-source library called http-queryable has been released to handle this correctly for Node.js frameworks including Express, Fastify, and raw HTTP, and requires Node 22 or later.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Go 1.26 Introduces 'go fix' Tool to Automate Codebase Modernization

Go 1.26 introduces a built-in 'go fix' tool that automates the process of updating codebases to use newer language features and standard library APIs. The tool is version-aware, respecting the Go version declared in a project's go.mod file to prevent incompatible changes. Developers can run a dry-run mode to preview suggested changes before applying them, and a two-pass approach is recommended to catch additional modernization opportunities. The tool integrates with CI/CD pipelines and supports custom analyzers, though misconfigured rules can introduce false positives and unnecessary code changes. Unlike tools such as staticcheck, 'go fix' goes beyond identifying issues by automating the refactoring itself, reducing manual effort and technical debt.

0
ProgrammingDEV Community ·

How the GS1 Mod-10 Algorithm Determines Your Barcode's Check Digit

Every GTIN barcode — including UPC-A, EAN-13, and GTIN-14 — ends with a check digit calculated using the GS1 Mod-10 algorithm, not assigned randomly. The algorithm multiplies each digit by alternating weights of 3 and 1 from right to left, sums the products, and derives the check digit as the value needed to reach the next multiple of 10. An incorrect check digit is the most common reason product listings get rejected on platforms like Amazon, Google Merchant Center, and Shopify. A frequent source of errors is Excel automatically stripping leading zeros from barcodes, which changes the digit count and invalidates the code. Developers can implement the validation in a few lines of Python, and bulk feed validation is also possible via deterministic JSON APIs.

0
ProgrammingDEV Community ·

SproutRAG Uses Binary Chunk Trees to Improve RAG Efficiency by 6%

Researchers have introduced SproutRAG, a retrieval-augmented generation system that organizes document chunks into binary trees to improve information retrieval. The approach boosts information efficiency by 6.1 percent on average over the strongest baseline across four benchmarks, without requiring additional LLM calls at retrieval time. SproutRAG learns which attention heads and layers best capture document structure, enabling multi-granularity retrieval while maintaining relevance comparable to standard flat vector-store RAG pipelines. The system also reduces retrieval latency, though specific speedup figures were not detailed in the paper's abstract. Limitations remain, as the study does not address indexing costs or performance on very large corpora, leaving scalability questions open for future research.

0
ProgrammingDEV Community ·

Developer builds sshpic to paste local screenshots directly into remote SSH sessions

A developer has released sshpic, an open-source tool that streamlines sharing screenshots between a local Mac and a remote SSH session. The tool was created to eliminate the cumbersome multi-step process of saving a screenshot, transferring it via SCP, and manually pasting the remote file path into a terminal coding agent. When a user presses Cmd+V inside an iTerm2 SSH session, sshpic reads the local clipboard, uploads any image to the remote host over SSH, and inserts the resulting remote path directly into the active terminal. The tool is intentionally scoped to macOS users running iTerm2 with real SSH connections, and performs no cloud uploads nor requires any installation on the remote machine. The developer has cautioned users to be mindful of sensitive content in screenshots, such as passwords or API keys, and has invited feedback from those working with remote SSH coding-agent workflows.