This project is read-only.

Fluent Interface for WebRequest object

WebRequest object is usually used by us. That is a reason I create this project. I also used this class but I feel it is very un-readable code. How do you feel if you code it have something like that:

var url = "";
url += BuiltParammetters();
objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Method = "POST";
objRequest.ContentLength = strPost.Length;
objRequest.ContentType = "application/x-www-form-urlencoded";         
objRequest.CookieContainer = myContainer;

Certainly it will be good, but we can make it for better as:

var result = RequestSubmitter.GetInstance()
                .Item.WithNameIs("q").ValueIs("Queen Elizabeth II")

And that is a purpose of this project as well.

I love fluent and love semantic that express through Fluent Interface

Last edited May 17, 2011 at 10:48 PM by thangchung, version 4