Quantcast

Jump to content


Photo

[C#] SimpleWrapper

programming c# wrapper neopets login

  • Please log in to reply
2 replies to this topic

#1 Dan

Dan
  • Resident Know-It-All

  • 6382 posts


Users Awards

Posted 20 February 2014 - 11:17 AM

Hey guys.
 
I've decided to release my very barebones HTTP wrapper, in the hope that you guys might find it useful in some way.

 

----

SimpleWrapper

 

Features:

  • GET and POST methods supported (no PUT)
  • Cookie management
  • Proxy support
  • Custom user-Agent
  • Gzip decompression

To do:

  • Custom headers (per request?)
  • Downloading files - in particular images
  • Import / Export cookies, cookie lifetime management

Usage - Setup w/ proxy and custom user agent

var proxy = new WebProxy("127.0.0.1", 8888);
proxy.Credentials = new NetworkCredential("foo", "bar");

var options = new WrapperOptions(proxy, "Mozilla/5.0 (Macintosh; Intel...snip");
var wrapper = new SimpleWrapper(options);

Usage - Humanised Neopets login (GET & POST)

GetString and PostString are the two methods used for GET and POST HTTP requests. Both return the HTML from the HTTP response, sans any headers.

wrapper.GetString("http://www.neopets.com");

var loginResponse = httpWrapper.PostString(
	"http://www.neopets.com/login.phtml",
	string.Format("destination=%252F&username={0}&password={1}", username, password));

Download link:

 

http://www.dev.lemon...mplewrapper.zip

 

Permalink:

 

http://www.dev.lemony.co/wrapper

 

License:

CC-BY-SA

 

--------------

 

Let me know if this helps any of you guys.



#2 Agret

Agret
  • 1 posts

Posted 19 February 2015 - 02:40 PM

Hey man this would be very useful for a program i'm writing but your domain is dead, can you re-host this somewhere? Thanks



#3 Dan

Dan
  • Resident Know-It-All

  • 6382 posts


Users Awards

Posted 23 February 2015 - 04:30 PM

Clicky





Also tagged with one or more of these keywords: programming, c#, wrapper, neopets login

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users