<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Avi Natani</title>
    <description>The latest articles on DEV Community by Avi Natani (@avi_natani_732ee2ebef2121).</description>
    <link>https://dev.to/avi_natani_732ee2ebef2121</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3251159%2F4036f266-9cfa-453d-8b3f-8a6cb03a7733.jpg</url>
      <title>DEV Community: Avi Natani</title>
      <link>https://dev.to/avi_natani_732ee2ebef2121</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/avi_natani_732ee2ebef2121"/>
    <language>en</language>
    <item>
      <title>The API worked. The payload didn’t.</title>
      <dc:creator>Avi Natani</dc:creator>
      <pubDate>Mon, 07 Sep 2026 04:28:00 +0000</pubDate>
      <link>https://dev.to/avi_natani_732ee2ebef2121/the-api-worked-the-payload-didnt-1nhe</link>
      <guid>https://dev.to/avi_natani_732ee2ebef2121/the-api-worked-the-payload-didnt-1nhe</guid>
      <description>&lt;p&gt;I kept shipping APIs I hadn’t really looked at.&lt;/p&gt;

&lt;p&gt;I’d ask whatever assistant was open Cursor, Claude, Antigravity, Trae for a users endpoint. It generated the route, the DTO, the response. The page rendered. I moved on.&lt;/p&gt;

&lt;p&gt;Then I opened DevTools → Network.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Full objects on a list view&lt;/li&gt;
&lt;li&gt;Nulls everywhere&lt;/li&gt;
&lt;li&gt;Verbose keys&lt;/li&gt;
&lt;li&gt;Extra timestamps&lt;/li&gt;
&lt;li&gt;Fields the UI never used&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Gzip made the response look small, so I ignored it.&lt;/p&gt;

&lt;p&gt;That was the mistake.&lt;/p&gt;

&lt;h2&gt;
  
  
  Working is not the same as small
&lt;/h2&gt;

&lt;p&gt;This is not only a backend problem. Frontend apps consume these payloads too.&lt;/p&gt;

&lt;p&gt;If the client receives something like 500KB and only needs 50KB, both sides pay for it, whether the contract was written by you, your team, or an agent.&lt;/p&gt;

&lt;p&gt;Compression hides sloppy JSON. It doesn't delete fields you shouldn't have sent.&lt;/p&gt;

&lt;p&gt;A normal-looking user list I ran through this looked like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3.01 KB raw&lt;/li&gt;
&lt;li&gt;score 52/100&lt;/li&gt;
&lt;li&gt;about 54% of the bytes looked optional&lt;/li&gt;
&lt;li&gt;pretty-print whitespace alone: 904 B&lt;/li&gt;
&lt;li&gt;the same &lt;code&gt;preferences&lt;/code&gt; object repeated on every row: 528 B&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then Gzip crushed it to a few hundred bytes. That’s how this survives code review. The wire looks fine. The shape is still fat.&lt;/p&gt;

&lt;h2&gt;
  
  
  I didn’t want another dashboard
&lt;/h2&gt;

&lt;p&gt;I didn’t want a place where I paste a giant JSON blob and stare at charts.&lt;/p&gt;

&lt;p&gt;I wanted the same agent that wrote the endpoint to look at it and say: we don’t need all this.&lt;/p&gt;

&lt;p&gt;So I built &lt;a href="https://bandwidthguard.chidkoli.com/" rel="noopener noreferrer"&gt;BandwidthGuard&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Two ways in.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. You have the response
&lt;/h3&gt;

&lt;p&gt;Go to &lt;a href="https://bandwidthguard.chidkoli.com/analyze" rel="noopener noreferrer"&gt;/analyze&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Paste JSON, drop a HAR, or paste cURL. It stays in the browser. Nothing gets uploaded.&lt;/p&gt;

&lt;p&gt;You get a score, a field-level breakdown, Gzip / Brotli / Zstd / MessagePack / CBOR on that payload, and fixes split into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;safe&lt;/li&gt;
&lt;li&gt;review with the team&lt;/li&gt;
&lt;li&gt;this changes the contract&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last split matters more than the codec table. Minifying JSON is easy. Pulling email off a list endpoint is not the same kind of change.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. You don’t want to paste JSON first
&lt;/h3&gt;

&lt;p&gt;This is the path I actually use when I just generated the endpoint.&lt;/p&gt;

&lt;p&gt;On the homepage, open &lt;strong&gt;Feed Payload Insights into Your AI Coding Agent&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pick Cursor, Claude, ChatGPT, Gemini, DeepSeek, Grok, or Antigravity&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;GET /v1/users&lt;/code&gt; or just &lt;code&gt;User list&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Copy the prompt&lt;/li&gt;
&lt;li&gt;Drop it into the same chat that wrote the endpoint&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The prompt already tells the agent to find bloat, clean the serializer, compare compression, show before/after, and check work in the analyzer. It also points to &lt;a href="https://bandwidthguard.chidkoli.com/llms.txt" rel="noopener noreferrer"&gt;&lt;code&gt;/llms.txt&lt;/code&gt;&lt;/a&gt; so the model isn’t inventing a process.&lt;/p&gt;

&lt;p&gt;Generate → inspect one payload, or skip straight to the prompt → slim the serializer → paste the new response back if you want proof.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this is not
&lt;/h2&gt;

&lt;p&gt;It is not an APM.&lt;br&gt;&lt;br&gt;
It is not your cloud invoice.&lt;br&gt;&lt;br&gt;
It will not cut a bill by some fixed percentage just because Gzip exists.&lt;/p&gt;

&lt;p&gt;If compression is already on, the useful win is structural: stop sending unused fields.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you try it
&lt;/h2&gt;

&lt;p&gt;Use a list endpoint you didn’t hand-write. Detail endpoints are usually less embarrassing.&lt;/p&gt;

&lt;p&gt;Then look at two things only:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Which fields are marked unused&lt;/li&gt;
&lt;li&gt;Whether the suggested fix is safe or a contract change&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Free. No account. Runs in the tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bandwidthguard.chidkoli.com/" rel="noopener noreferrer"&gt;https://bandwidthguard.chidkoli.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I built this because I got tired of shipping apps that worked and still moved more data than they needed.&lt;br&gt;
Cover image: the 5:2 two-card graphic (agent-cards-5x2-wide.jpg).&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>javascript</category>
      <category>performance</category>
    </item>
  </channel>
</rss>
