June 2017
Intermediate to advanced
400 pages
10h 32m
English
These steps cover writing and running your application:
package proxy import ( "log" "net/http" ) // Proxy holds our configured client // and BaseURL to proxy to type Proxy struct { Client *http.Client BaseURL string } // ServeHTTP means that proxy implments the Handler interface // It manipulates the request, forwards it to BaseURL, then // returns the response func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {Read now
Unlock full access