Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for parseRequestLine (0.18 sec)

  1. src/net/http/request.go

    func (r *Request) SetBasicAuth(username, password string) {
    	r.Header.Set("Authorization", "Basic "+basicAuth(username, password))
    }
    
    // parseRequestLine parses "GET /foo HTTP/1.1" into its three parts.
    func parseRequestLine(line string) (method, requestURI, proto string, ok bool) {
    	method, rest, ok1 := strings.Cut(line, " ")
    	requestURI, proto, ok2 := strings.Cut(rest, " ")
    	if !ok1 || !ok2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 49.4K bytes
    - Viewed (0)
Back to top