Skip to content

Conversation

@MattCCC
Copy link
Owner

@MattCCC MattCCC commented Feb 10, 2026

This pull request introduces support for a custom parser option in the request configuration, allowing users to fully control how HTTP responses are parsed. It also refines the default binary response parsing behavior to use ArrayBuffer for a broader set of binary content types, and updates the response wrapper to provide consistent, idempotent methods for accessing parsed data. Documentation and tests have been updated to reflect these enhancements.

✨ Features & Improvements

  • Added Custom Response Parser - parser option to config (both global and per-request) for custom response parsing.
  • Improved binary response handling:
    • response.data is now ArrayBuffer for binary content types.
    • .blob() and .bytes() methods create and return Blob / Uint8Array on demand.
  • Documented parser option with XML/CSV examples and fallback parsing order.
  • Clarified default handling for XML, CSV, and custom content types: returns raw text unless a parser is provided.
  • Updated README to reflect new response parsing behavior and binary data access patterns.

@MattCCC MattCCC changed the title feat: add custom response parser option and enhance binary data handling Add custom response parser option and enhance binary data handling Feb 10, 2026
@github-actions
Copy link

github-actions bot commented Feb 10, 2026

size-limit report 📦

Path Size
dist/browser/index.mjs 5.67 KB (+0.51% 🔺)
dist/browser/index.global.js 5.85 KB (+0.19% 🔺)
dist/node/index.js 5.75 KB (+0.09% 🔺)
dist/react/index.mjs 8.7 KB (-0.03% 🔽)
dist/react/index.js 9.48 KB (+0.07% 🔺)

@MattCCC MattCCC merged commit 55b3689 into master Feb 10, 2026
10 checks passed
@MattCCC MattCCC deleted the response-parser branch February 10, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants