httplib support to set the protocol version for incoming requests

This commit is contained in:
toby.zxj
2014-05-09 15:48:50 +08:00
committed by astaxie
parent 14688f240f
commit f4e7d63e65
2 changed files with 22 additions and 0 deletions

View File

@@ -73,3 +73,8 @@ httplib support mutil file upload, use `b.PostFile()`
t.Fatal(err)
}
fmt.Println(str)
## set HTTP version
some servers need to specify the protocol version of HTTP
httplib.Get("http://beego.me/").SetProtocolVersion("HTTP/1.1")