Coding part of ESP8266

There's a built in example for ESP8266 WebServer and Client , why don't you use that as a starting ?