Skip to content

Header

Use ReceiveHeader() to retrieve header fields and SendHeader() to send them.

lib/handlers/welcome.go
package handlers
import "github.com/razshare/frizzante/connections"
func Welcome(connection *connections.Connection) {
accept := connection.ReceiveHeader("Accept") // Retrieves field "Accept".
connection.SendHeader("Content-Type", accept) // Sends it back.
}