Swashbuckle.AspNetCore icon indicating copy to clipboard operation
Swashbuckle.AspNetCore copied to clipboard

[Question]: Can I override the User-Agent http header used to try out API calls?

Open xavierdecoster opened this issue 1 month ago • 1 comments

What are you wanting to achieve?

I am trying to set a default user-agent http request header to be used for API calls made through the Swagger UI. Is this possible? How?

What code or approach do you have so far?

I've been trying various approaches using a custom.js file that configures a requestInterceptor to set the request.headers['User-Agent'], but that didn't work. I've also tried setting it using an IOperationFilter, but that didn't help either.

Additional context

No response

xavierdecoster avatar Jan 23 '25 16:01 xavierdecoster