how a web request works