I dont know anything about existing library.
few things:
client do not depends on server machine type or os
server do not depends on clients machine type or anything else.
you wont have to worry about what kind of webserver you are dealing with. you will have to worry about how will you handle http protocol.
just for a test, do this.
open telnet on port 80(it may vary based on prot number) as example
>telnet www.google.com 80
GET / HTTP/1.0
exactly two new line after putting the line.
then you will get reply from http server. your telnet even dont know what kind of server it is