beego中如何從輸入流中獲取數據

step1:在beego項目中添加: copyrequestbody = true 然後在控制器中添加代碼: req:=this.Ctx.Input.RequestBody data:=string(req) 這樣就可以獲取輸入流中的字符串內容了,具體代碼如下實例: func (this *ApiController) Dd() { req:=this.Ctx.Input.RequestBod
相關文章
相關標籤/搜索