Internal implementation of HTTP client and server