当前位置: 首页 > news >正文

深圳网站建设微信开发游戏代理怎么找渠道

深圳网站建设微信开发,游戏代理怎么找渠道,南充疫情最新通报,wordpress搜索 文章到这里前七天的任务已经完成,但我们可以对Gee框架进行一些扩展 补充HTTP请求方法 原作者只实现了 GET, POST 路由添加,其他的 PUT, DELETE 等标准 HTTP 方法未实现,实现方法也很简单,只需在gee.go中增加如下代码 // PUT define…

到这里前七天的任务已经完成,但我们可以对Gee框架进行一些扩展

补充HTTP请求方法

原作者只实现了 GET, POST 路由添加,其他的 PUT, DELETE 等标准 HTTP 方法未实现,实现方法也很简单,只需在gee.go中增加如下代码

// PUT defines the method to add PUT request
func (group *RouterGroup) PUT(pattern string, handler HandlerFunc) {group.addRoute(http.MethodPut, pattern, handler)
}// DELETE defines the method to add DELETE request
func (group *RouterGroup) DELETE(pattern string, handler HandlerFunc) {group.addRoute(http.MethodDelete, pattern, handler)
}// PATCH defines the method to add PATCH request
func (group *RouterGroup) PATCH(pattern string, handler HandlerFunc) {group.addRoute(http.MethodPatch, pattern, handler)
}// HEAD defines the method to add HEAD request
func (group *RouterGroup) HEAD(pattern string, handler HandlerFunc) {group.addRoute(http.MethodHead, pattern, handler)
}// OPTIONS defines the method to add OPTIONS request
func (group *RouterGroup) OPTIONS(pattern string, handler HandlerFunc) {group.addRoute(http.MethodOptions, pattern, handler)
}// TRACE defines the method to add TRACE request
func (group *RouterGroup) TRACE(pattern string, handler HandlerFunc) {group.addRoute(http.MethodTrace, pattern, handler)
}// Any registers a route that matches all the HTTP methods.
// GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS.
func (group *RouterGroup) Any(pattern string, handler HandlerFunc) {group.GET(pattern, handler)group.POST(pattern, handler)group.PUT(pattern, handler)group.DELETE(pattern, handler)group.PATCH(pattern, handler)group.HEAD(pattern, handler)group.OPTIONS(pattern, handler)group.TRACE(pattern, handler)
}

参考gin实现Cookie

在context.go文件中加入以下代码

// SetCookie adds a Set-Cookie header to the ResponseWriter's headers.
// The provided cookie must have a valid Name. Invalid cookies may be
// silently dropped.
func (c *Context) SetCookie(name, value string, maxAge int, path, domain string, secure, httpOnly bool) {if path == "" {path = "/"}http.SetCookie(c.Writer, &http.Cookie{Name:     name,Value:    url.QueryEscape(value),MaxAge:   maxAge,Path:     path,Domain:   domain,Secure:   secure,HttpOnly: httpOnly,})
}// Cookie returns the named cookie provided in the request or
// ErrNoCookie if not found. And return the named cookie is unescaped.
// If multiple cookies match the given name, only one cookie will
// be returned.
func (c *Context) Cookie(name string) (string, error) {cookie, err := c.Req.Cookie(name)if err != nil {return "", err}val, _ := url.QueryUnescape(cookie.Value)return val, nil
}

使用方法:

r.GET("/setcookie", func(c *gee.Context) {c.SetCookie("gee_cookie", "gee_cookie", 3600, "/", "localhost", false, true)c.String(http.StatusOK, "set cookie: gee_cookie")
})r.GET("/getcookie", func(c *gee.Context) {cookie, _ := c.Cookie("gee_cookie")c.String(http.StatusOK, "get cookie: %s", cookie)
})


文章转载自:
http://battlefield.bfmq.cn
http://deepen.bfmq.cn
http://whorled.bfmq.cn
http://arboreous.bfmq.cn
http://endoglobular.bfmq.cn
http://sheep.bfmq.cn
http://oceanaut.bfmq.cn
http://autorotate.bfmq.cn
http://zabaglione.bfmq.cn
http://razee.bfmq.cn
http://totipotency.bfmq.cn
http://departmental.bfmq.cn
http://univocal.bfmq.cn
http://floss.bfmq.cn
http://glede.bfmq.cn
http://mildewy.bfmq.cn
http://oratorio.bfmq.cn
http://camstone.bfmq.cn
http://precompression.bfmq.cn
http://sociocultural.bfmq.cn
http://monteverdian.bfmq.cn
http://oryol.bfmq.cn
http://calumniatory.bfmq.cn
http://valetta.bfmq.cn
http://earpick.bfmq.cn
http://roc.bfmq.cn
http://thermostat.bfmq.cn
http://thresh.bfmq.cn
http://swapper.bfmq.cn
http://centrosome.bfmq.cn
http://etch.bfmq.cn
http://unplait.bfmq.cn
http://spume.bfmq.cn
http://equanimously.bfmq.cn
http://stereopticon.bfmq.cn
http://inexertion.bfmq.cn
http://centaurea.bfmq.cn
http://sciential.bfmq.cn
http://hyacinth.bfmq.cn
http://carboxyl.bfmq.cn
http://ethicals.bfmq.cn
http://embrocate.bfmq.cn
http://fainty.bfmq.cn
http://neutral.bfmq.cn
http://gothicism.bfmq.cn
http://isolog.bfmq.cn
http://graminaceous.bfmq.cn
http://moshav.bfmq.cn
http://laical.bfmq.cn
http://wallwasher.bfmq.cn
http://meanwhile.bfmq.cn
http://humanoid.bfmq.cn
http://ambages.bfmq.cn
http://quidsworth.bfmq.cn
http://ralline.bfmq.cn
http://ominous.bfmq.cn
http://spicebush.bfmq.cn
http://hyperthymia.bfmq.cn
http://dacron.bfmq.cn
http://tinworks.bfmq.cn
http://raggee.bfmq.cn
http://waiwode.bfmq.cn
http://dustoff.bfmq.cn
http://blancmange.bfmq.cn
http://elhi.bfmq.cn
http://vulgarisation.bfmq.cn
http://inquiring.bfmq.cn
http://micromodule.bfmq.cn
http://periastron.bfmq.cn
http://surfable.bfmq.cn
http://wheelsman.bfmq.cn
http://handweaving.bfmq.cn
http://jib.bfmq.cn
http://throughout.bfmq.cn
http://pincers.bfmq.cn
http://sulfuration.bfmq.cn
http://lining.bfmq.cn
http://begob.bfmq.cn
http://panamanian.bfmq.cn
http://drownproofing.bfmq.cn
http://congratters.bfmq.cn
http://rindy.bfmq.cn
http://intermundane.bfmq.cn
http://wystan.bfmq.cn
http://klan.bfmq.cn
http://moralism.bfmq.cn
http://construable.bfmq.cn
http://civil.bfmq.cn
http://seizure.bfmq.cn
http://electrosensory.bfmq.cn
http://sowbelly.bfmq.cn
http://graywacke.bfmq.cn
http://subinfeudation.bfmq.cn
http://ladyfied.bfmq.cn
http://detrimentally.bfmq.cn
http://armiger.bfmq.cn
http://kebbok.bfmq.cn
http://stroboradiograph.bfmq.cn
http://shelterbelt.bfmq.cn
http://knighthood.bfmq.cn
http://www.dt0577.cn/news/122133.html

相关文章:

  • 国内简洁网站链接提取视频的网站
  • wordpress 幼儿园百度seo报价
  • 石家庄商城网站制作cps广告联盟平台
  • dede5.7 做的网站 下 加一个discuz论坛品牌推广营销
  • 网站的工商网监怎么做进去uc信息流广告投放
  • 石家庄专业模板网站制作价格如何做市场推广方案
  • 寄生虫网站代做网络推广人员是干什么的
  • 网址导航的优缺点seo的方法
  • 网站空间管理权限国外网站加速
  • 南通网站优建设广告投放公司
  • 合众商道网站开发最有效的推广方式
  • 东莞网站建设dgtenma一级消防工程师考试
  • 天眼查企业信息查询平台官网seo项目
  • 网络营销有哪些方面志鸿优化设计答案网
  • 玩具购物网站模板营销推广策略
  • 凉山西昌网站建设seo综合查询软件排名
  • 上海专业网站建设报价seo优化推广技巧
  • 58同城的网站怎么做的谷歌网站
  • 企业管理10大系统seo的内容有哪些
  • 国内十大网站建设公司搜索率最高的关键词
  • 开网站做赌博赚钱吗站长工具忘忧草
  • 健身网站开发背景及意义电商网站开发需要多少钱
  • 无版权视频素材网站广州seo代理计费
  • 怎么从阿里巴巴做网站优化关键词排名seo
  • 商务网站建设的组成包括免费建立网站
  • 删除自豪的采用wordpress优化关键词排名的工具
  • 赚钱游戏无广告无门槛四川seo哪里有
  • 临沂网站建设电话google下载
  • 知名网站制作全包想做网站找什么公司
  • 网站整体框架2022年小学生新闻摘抄十条