C
C#15mo ago
Toichkin

❔ HttpClient Request headers automatically capitalizing.

How do i stop my HttpClient Header Names from automatically capitalizing? tried TryAddWithoutValidation, still the header names are getting automatically capitalized.
14 Replies
Angius
Angius15mo ago
According to RFC 2616 header names are not case-sensitive So it doesn't matter
Toichkin
ToichkinOP15mo ago
in this case, for my purpose, it matters, any help would be appreciated
SWR
SWR15mo ago
Why does it matter?
Toichkin
ToichkinOP15mo ago
because the server only accepts it in lowercase
Angius
Angius15mo ago
The server does not follow the HTTP spec, then, and should be thrown into the trash where it belongs That's also the official answer to the issue: https://github.com/dotnet/runtime/issues/30819#issuecomment-538548816
SWR
SWR15mo ago
Who maintains the server?
Toichkin
ToichkinOP15mo ago
it's api of a big company (im not abusing it for harm)
SWR
SWR15mo ago
Bad company
Toichkin
ToichkinOP15mo ago
wouldn't say that if they are a bad company they wouldn't have 3.2 billion sales volume
SWR
SWR15mo ago
Ok. If you REALLY need to lowercase the headers, the best I can think of is make a man in the middle local tcp server. You intercept http messages and just lowercase the headers Sadly, that totally screws your network. Is this for work or school? You could also fork libhttpserver and lowercase the headers
Toichkin
ToichkinOP15mo ago
i was thinking of using restsharp, but i don't know if that would fix it
SWR
SWR15mo ago
catshrug is this big company server anyway?
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
Accord
Accord15mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server