1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-12 08:10:39 +00:00

add go simple support

This commit is contained in:
Sergey Lanzman
2017-03-17 19:24:45 +02:00
parent 21d1267c14
commit 37c1ffc57a
43 changed files with 150 additions and 228 deletions

View File

@ -335,7 +335,7 @@ func (b *BeegoHTTPRequest) JSONBody(obj interface{}) (*BeegoHTTPRequest, error)
func (b *BeegoHTTPRequest) buildURL(paramBody string) {
// build GET url with query string
if b.req.Method == "GET" && len(paramBody) > 0 {
if strings.Index(b.url, "?") != -1 {
if strings.Contains(b.url, "?") {
b.url += "&" + paramBody
} else {
b.url = b.url + "?" + paramBody