mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #5772] [bug]: Missing User-Agent String in Generated Code #2254
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#2254
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Grauenwolf on GitHub (Jan 14, 2026).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5772
Originally assigned to: @swaraj017 on GitHub.
Is there an existing issue for this?
Platform
Web App
Browser
Chrome
Operating System
Windows
Bug Description
When Hoppscotch makes a web request via the browser, it includes a User-Agent header.
When using the "Show Code" feature, the User-Agent header isn't included when generating C# code.
This can cause the C# code to fail if the server is expecting a User-Agent header.
Suggestion
Have the code generator include the User-Agent header by default to avoid unexpected surprises.
Deployment Type
Hoppscotch Cloud
Version
No response
@mohswell commented on GitHub (Jan 16, 2026):
Hi @Grauenwolf can i work on this?
Is this the header I should add
value: "Hoppscotch Agent"@Grauenwolf commented on GitHub (Jan 16, 2026):
I don't know what is currently using so I can't advise. I ended up just stealing the user agent string from Powershell for my C# code.
@swaraj017 commented on GitHub (Feb 11, 2026):
Hi @Grauenwolf
I’d like to take up this issue.
I will review the C# code generator to identify why the User-Agent header is not included and update the generation logic so that it correctly reflects the request headers.
Please let me know if I can proceed.