The previous recipe, Connecting to the remote server, gave us an insight into how to connect the TCP server at a lower level. In this recipe, communication with the HTTP server at a higher level will be shown.
The previous recipe, Connecting to the remote server, gave us an insight into how to connect the TCP server at a lower level. In this recipe, communication with the HTTP server at a higher level will be shown.
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
type StringServer string
func (s StringServer) ServeHTTP(rw http.ResponseWriter,
req *http...