microsoft / referencesource

Source from the Microsoft .NET Reference Source that represent a subset of the .NET Framework
https://referencesource.microsoft.com/
MIT License
3.13k stars 1.26k forks source link

Include (429) TooManyRequests in HttpStatusCodeEnum #173

Open anushreeringne opened 1 year ago

anushreeringne commented 1 year ago

Please include TooManyRequests=429 in the list of statuscodes. https://github.com/Microsoft/referencesource/blob/master/System/net/System/Net/HttpStatusCode.cs

https://www.rfc-editor.org/rfc/rfc6585.html#:~:text=429%20Too%20Many%20Requests%20The%20429%20status%20code,long%20to%20wait%20before%20making%20a%20new%20request.

svick commented 1 year ago

This status code was added in .Net Core 2.1, see https://github.com/dotnet/runtime/issues/15650. Since new APIs are not being added to .Net Framework, you'll have to use (HttpStatusCode)429 if you can't switch to .Net Core/.Net 5+.