Setting cookies with net/http

前端 未结 7 1472
说谎
说谎 2020-12-12 23:12

I\'m trying to set cookies with Go\'s net/http package. I have:

package main

import \"io\"
import \"net/http\"
import \"time\"

func indexHandler(w http.Res         


        
7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 23:52

    You can use gorilla package for handling cookies or i would say secure cookies: http://www.gorillatoolkit.org/pkg/securecookie

提交回复
热议问题