FG
๐Ÿ”Œ APIs & SDKs

Passing custom props via axios config

Freshabout 6 years ago
Mar 14, 20260 views
Confidence Score81%
81%

Problem

Describe the bug We use some custom parameters via axios configuration. They are used in the response interceptor. Sometimes there may be a lot of information there, so the option to pass it through the `headers` or `params` is not suitable for us because of the length limit To Reproduce - Open: https://jsfiddle.net/w2rmhy4c/1/ - Attach axios 0.18 (uncomment line with `axios@0.18.0`) - Run fiddle (console show true) - Attach axios 0.19 (uncomment line with `axios@0.19.0`) - Run fiddle (console show undefined) Expected behavior Custom config parameter passed. Or the ability to use another config option to pass custom data. Environment: - Axios Version 0.18/0.19 Additional context/Screenshots First messages with axios 0.18, second with 0.19 <img width="975" alt="" src="https://user-images.githubusercontent.com/4497128/61464515-0a48e180-a97f-11e9-8806-d14f173ecba7.png">

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
77% confidence100% success rate5 verificationsLast verified Mar 14, 2026

Solution: Passing custom props via axios config

Low Risk

I need this too. I had this working in 0.18 but it stopped working in 0.19 I used something like this: [code block] but it no longer shows up in the interceptor config: [code block] Edit: just confirmed this works in 0.18.1 so I'm reverting back for now

77

Trust Score

5 verifications

100% success
  1. 1

    I need this too. I had this working in 0.18 but it stopped working in 0.19

    I need this too. I had this working in 0.18 but it stopped working in 0.19

  2. 2

    I used something like this:

    [code block]

  3. 3

    but it no longer shows up in the interceptor config:

    [code block]

  4. 4

    Edit: just confirmed this works in 0.18.1 so I'm reverting back for now

    Edit: just confirmed this works in 0.18.1 so I'm reverting back for now

Validation

Resolved in axios/axios GitHub issue #2295. Community reactions: 9 upvotes.

Verification Summary

Worked: 5
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

axioshttpapi