FG
💻 Software🌐 Web & Full-Stack

Procedure specific custom request headers

Freshalmost 3 years ago
Mar 14, 20260 views
Confidence Score88%
88%

Problem

Discussed in https://github.com/trpc/trpc/discussions/2017 <div type='discussions-op-text'> <sup>Originally posted by skovhus June 17, 2022</sup> From the documentation and code example it seems like Client side HTTP headers can only be configured in the tRPC client and not call site when doing a query or mutation. But there are use cases where you want to pass in specific headers for a single procedure. What is the recommended way here? Is that something we lack support for? Example use case: Elevated privileges that would update the authorization header for a single procedure. </div>

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
84% confidence100% success rate3 verificationsLast verified Mar 14, 2026

Solution: Procedure specific custom request headers

Low Risk

cc @zomars @abhayvatsa @leog The question to answer is _"How do we handle when a specific procedure should be called with custom headers?"_ Please read through the thoughts above 🙏

84

Trust Score

3 verifications

100% success
  1. 1

    The question to answer is _"How do we handle when a specific procedure should be

    The question to answer is _"How do we handle when a specific procedure should be called with custom headers?"_

  2. 2

    Please read through the thoughts above 🙏

    Please read through the thoughts above 🙏

Validation

Resolved in trpc/trpc GitHub issue #2018. Community reactions: 2 upvotes.

Verification Summary

Worked: 3
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

trpctypescriptapi