From e051f9edb691e5b4cd6a6359ecf27ce002125982 Mon Sep 17 00:00:00 2001 From: Jason Chung Date: Mon, 13 Jan 2025 13:48:37 +0800 Subject: [PATCH] fix: support transform request headers (#347) --- package.json | 2 +- src/Reaxios.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c30e746..7a936d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@0y0/reaxios", - "version": "1.3.1", + "version": "1.3.2", "description": "Easy-to-use HTTP client based on axios for the browser and NodeJS.", "src": "src/index.js", "main": "dist/index.cjs.js", diff --git a/src/Reaxios.js b/src/Reaxios.js index 075edbd..495da77 100644 --- a/src/Reaxios.js +++ b/src/Reaxios.js @@ -75,7 +75,7 @@ export default class Reaxios { const promise = (async () => { let data = this.#body for (const transformer of this.#requestTransformers) - data = await transformer(data) + data = await transformer(data, this.#headers) let response = await axios({ url: this.#url,