Adding User-Agent header to IPnPContextFactory.CreateAsync() #1551
Unanswered
Amwins-Bass-Guy
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@Amwins-Bass-Guy : the ask is not fully clear to me, you're able to set a default user-agent for your application using the configuration options, but for some calls you want to set another one. Today you use the .WithHeaders option for that, but you'd rather override the user-agent when creating the PnPContext? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are trying to verify that all of our PnP requests have our specified
User-Agent
header to make sure that Microsoft can track down any throttling (or other issues) by client application. Where we can, all PnP calls have.WithHeaders()
specified, but, when the PnPContext is created (usingCreateAsync()
), those two requests have the default user agent value that was set inAddPnPCore()
.Is there a way to pass a request header using the
PnPContextOptions
(or other mechanism), toCreateAsync()
?Default UserAgent:
Beta Was this translation helpful? Give feedback.
All reactions