Skip to content

Instantly share code, notes, and snippets.

@jnriver
Created February 19, 2014 08:55
Show Gist options
  • Save jnriver/9088350 to your computer and use it in GitHub Desktop.
Save jnriver/9088350 to your computer and use it in GitHub Desktop.
beego中获取 GET 方法下的 URL
package controllers
import (
"fmt"
"github.com/astaxie/beego"
)
type MainController struct {
beego.Controller
}
func (this *MainController) Get() {
fmt.Println(this.Ctx.Request.URL)
this.Ctx.WriteString("Hello world!")
return
}
@jnriver
Copy link
Author

jnriver commented Feb 19, 2014

访问 http://localhost:8080/?redirect_uri=http%3A//auth.tratao.com/sina/callback&response_type=code

log:
2014/02/19 16:54:25 [I] Running on :8080
/?redirect_uri=http%3A//auth.tratao.com/sina/callback&response_type=code

@MarchLiu
Copy link

这部分在文档哪里来着?我又找不到了,话说这个文档还是太简陋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment