What is LightRest

LightRest is an Http client for .NET developers to consume REST based API services, fully supports OAuth 1.0 and comes with .NET Framework and .NET Compact Framework.

More and more amazing sites provide REST based API services sharing DATA, more and more developers have great ideas and ability to create more and more apps to satisfy end users with these services. If you are consuming some APIs like twitter, foursquare, and so on with .NET, you could try LightRest, it can help you easily fetch DATA through REST based APIs.

Supported Platforms

  • Desktop/Website supported with .NET Framework 3.5
  • Windows Mobile supported with .NET Compact Framework 3.5

Main Features at a glance

  • When preparing a request message
    • Easily create query string from a key value collection
    • Easily create url encoded form for posting data to server
    • Easily create multi-part data form for uploading files to server
  • When sending a request message
    • Many convenient methods for easily send request message synchronous or asynchronous
    • Provided an asynchronous completed event for callback when sending the request asynchronous
  • When processing the response message
    • Receive response message first and lazy load response content
    • Many easy methods for reading the response content
  • OAuth supported!

First piece of CODE

var client = new RestClient("http://twitter.com/statuses/");
client.TransportSettings.Credentials = 
new NetworkCredential("your_twitter_id", "your_twitter_password");

var response = client.Get("friends_timeline.xml");

var xml = response.ReadContentAsXElement();

var tweets = from tweet in xml.Elements("status")
             select new
             {
                 UserName = tweet.Element("user").Element("name").Value,
                 Tweet = tweet.Element("text").Value
             };
//your code goes here
Learn more...

Feedbacks wanted

I'd like to hear from you about the LightRest, please go to the Discussions to submit your ideas and Issue Tracker to submit bugs, great thanks :)

Last edited Aug 8, 2010 at 8:08 AM by shinyzhu, version 20