Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for FooHandler (0.09 sec)

  1. src/net/http/doc.go

    ListenAndServe starts an HTTP server with a given address and handler.
    The handler is usually nil, which means to use [DefaultServeMux].
    [Handle] and [HandleFunc] add handlers to [DefaultServeMux]:
    
    	http.Handle("/foo", fooHandler)
    
    	http.HandleFunc("/bar", func(w http.ResponseWriter, r *http.Request) {
    		fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path))
    	})
    
    	log.Fatal(http.ListenAndServe(":8080", nil))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 3.4K bytes
    - Viewed (0)
Back to top