Skip to content

Instantly share code, notes, and snippets.

@neuecc
Created June 27, 2014 06:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neuecc/30abd3cc26fd82eefc77 to your computer and use it in GitHub Desktop.
Save neuecc/30abd3cc26fd82eefc77 to your computer and use it in GitHub Desktop.
using System;
using System.Net.Http;
using System.Reactive.Linq;
using System.Reactive.Threading.Tasks;
class Program
{
static void Main(string[] args)
{
new HttpClient().GetStringAsync("http://twitter.com/statuses/user_timeline.json")
.ToObservable()
.Catch((HttpRequestException e) => Observable.Return("hogehoge"))
.Subscribe(Console.WriteLine);
Console.ReadLine();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment