Replies: 1 comment
-
Attaching HTTP headers to outgoing requests is documented here: https://twirphp.github.io/docs/beyond-the-basics/custom-http-headers TwirPHP uses the PSR HTTP client interface and I'm fairly certain most clients already support setting a user agent header. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I am using the auto-generated twirp clients and am looking for a way to easily attach the User-Agent header to all outgoing requests. Here is the way I am currently doing it:
but it feels very heavy-handed, since if i wanted to do this across repositories I would need to replicate the
UserAgentClient
code in each repoI was hoping there are simpler ways to do it via Interceptors / Client options that others are using. Any suggestions for the same?
Beta Was this translation helpful? Give feedback.
All reactions