diff --git a/vlib/http/http.v b/vlib/http/http.v index 92f675099e..6401dfd276 100644 --- a/vlib/http/http.v +++ b/vlib/http/http.v @@ -90,17 +90,7 @@ fn (resp mut Response) free() { } pub fn (req mut Request) add_header(key, val string) { - // println('start add header') - // println('add header "$key" "$val"') - // println(key) - // println(val) - // h := '$key: $val' - // println('SET H') - // req.headers << h req.headers[key] = val - // mut h := req.h - // h += ' -H "${key}: ${val}" ' - // req.h = h } pub fn parse_headers(lines []string) map[string]string { @@ -122,9 +112,6 @@ pub fn (req &Request) do() ?Response { if req.typ == 'POST' { // req.headers << 'Content-Type: application/x-www-form-urlencoded' } - for key, val in req.headers { - //h := '$key: $val' - } url := urllib.parse(req.url) or { return error('http.request.do: invalid URL "$req.url"') } mut rurl := url mut resp := Response{}