Make it to support other port and make the "get" function supports "headers" too.

Make it to support other port and make the "get" function supports "headers" too.

And formatted the code by the style of myself.