设为首页 加入收藏

TOP

Gin-Go学习笔记六:Gin-Web框架 Api的编写(三)
2017-12-23 06:06:46 】 浏览:3417
Tags:Gin-Go 学习 笔记 Gin-Web 框架 Api 编写
me/saveadd", AddPersonApi) //编辑页面 router.GET("/home/edit", EditHtml) router.POST("/home/saveedit", EditPersonApi) //删除 router.POST("/home/delete", DeletePersonApi) //Bootstrap布局页面 router.GET("/home/bootstrap", Bootstraphtml) //文件的上传和下载 router.GET("/home/fileopt", Fileopthtml) router.POST("/home/fileuplaod", Fileupload) router.GET("/home/filedown", Filedown) //文件的创建删除和读写 router.GET("/home/filerw", Filerwhtml) router.POST("/home/addfile", FilerCreate)//创建文件 router.POST("/home/writefile", FilerWrite)//写入文件 router.POST("/home/readfile", FilerRead)//读取文件 router.POST("/home/deletefile", FilerDelete)//删除文件 //api调用的部分 router.GET("/home/api", GetApiHtml) router.GET("/api/jsondata", GetJsonData) router.GET("/api/xmldata", GetXmlData) router.GET("/api/yamldata", GetYamlData) router.GET("/api/paramsdata", GetParamsJsonData) return router }

  

5>     编译测试,具体效果如下:

 

 

6>     下一章讲布局页面

首页 上一页 1 2 3 下一页 尾页 3/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Gin-Go学习笔记四:Gin-Web框架 .. 下一篇Gin-Go学习笔记五:Gin-Web框架 ..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目