Open the connection yourself with a socket (instead of an HttpRequest or WebClient), and close the stream as soon as you’ve read the status code. Fortunately the status code comes near the top of the response stream 🙂
More Related Contents:
- How do I use WebRequest to access an SSL encrypted site using HTTPS?
- Can I send webrequest from specified ip address with .NET Framework?
- Unexpected character error for quotes [closed]
- What’s wrong with using Thread.Abort()
- C# Interfaces. Implicit implementation versus Explicit implementation
- Using LINQ to remove elements from a List
- How to start a Process as administrator mode in C# [duplicate]
- Performance differences between debug and release builds
- Coercing floating-point to be deterministic in .NET?
- How to detect Windows shutdown or logoff
- Clipboard.GetText returns null (empty string)
- How does inheritance work for Attributes?
- dotnet core System.Text.Json unescape unicode string
- How to mark a method as obsolete or deprecated?
- Don’t stop debugger at THAT exception when it’s thrown and caught
- Updating an ObservableCollection in a separate thread
- How to remove new line characters from a string?
- BUG: Can’t choose dates on a DatePicker that fall outside a floating VSTO Add-In
- How do I copy the contents of a String to the clipboard in C#? [duplicate]
- OWIN’s GetExternalLoginInfoAsync Always Returns null
- C#: how to take a screenshot of a portion of screen
- Determining if a folder is shared in .NET
- What interfaces do all arrays implement in C#?
- Removing nodes from an XmlDocument
- Find the next TCP port in .NET
- How can I get the Position of textbox that has been pressed?
- Returning DataTables in WCF/.NET
- Unable to load SqlServerSpatial.dll
- Operator “>” cannot be applied to type ‘ulong’ and ‘int’
- Decompressing password-protected ZIP files with .NET 4.5