Project Description
WebRequestHelper is a very simple helper project, created for using HttWebRequest in Silverlight in a very simple and easiest way.

How to use WebRequestHelper:

  • Add reference of WebRequestHelper in your Silverlight project.
  • now you can easily use WebRequestHelper with the help of following code.
// create the web request.
WebRequestHelper.WebRequest webRequest = WebRequestHelper.WebRequest.Create("http://api.twitter.com/1/help/test.xml");

// register the completed event
webRequest.GetResponseCompleted += (e) =>
{
    if (e.Error == null && !string.IsNullOrEmpty(e.Result))
    {
        // do something with result.
        string myResult = e.Result;
    }
};

// call the request
webRequest.GetResponseAsync();

Last edited Apr 21, 2010 at 10:21 PM by ZainShaikh, version 4