Complete implementation for reading files from http server