TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Processing Twitter's Streaming API in .NET (with under 10 lines of code)

1 pointsby mboschover 14 years ago

2 comments

timrobinsonover 14 years ago
There's one less line of code if you use Encoding.UTF8 instead of instantiating your own object (although in principle the encoding is given to you in HttpWebResponse.ContentEncoding).<p>The Microsoft samples don't seem to do this, but consider putting your WebResponse and StreamReader objects in 'using' blocks: these classes implement IDisposable to ensure orderly cleanup.
mboschover 14 years ago
I'm hoping to build off of this but its the bare minimum to start processing the API. Of course, I'll be adding some queuing and analysis on top of this.