This is one of my favorite little projects, I called this the HTTPPackage because it really comes as a package!
Structure Breakdown;
Example Usage;Code:HTTPInterface (Handles the use of web interaction.) - HTTPPage (A handle for 1 individual page at a time.) - HTTPHeaders (A handle for saving and maintaining header properties.) - HTTPCookies (A handle for saving and maintaining cookie properties.) HTTPException (A custom exception class.) HTTPValidate (Validation scripts for URLs and Proxies.)
All exceptions will be thrown as a HTTPException, and have user-friendly error messages.Code:try { HTTPInterface web = new HTTPInterface ( ); web.headers.user_agent ( "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7" ); web.headers.accept ( "*/*" ); MessageBox.Show ( web.get ( "http://google.com" ) ); } catch ( HTTPException ex ) { MessageBox.Show ( ex.ErrorMessage ( ) ); }
HTTPPackage.rar | localhostr.com - share … anything
Results 1 to 1 of 1
- 01 Feb. 2012 12:29pm #1
- Age
- 30
- Join Date
- Nov. 2009
- Location
- Anaheim, California
- Posts
- 1,065
- Reputation
- 99
- LCash
- 2128.00
[C#] HTTPPackage (New and improved HTTPWrappers!)