{"modulePath":"github.com/Coding/drone","version":"v0.4.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package httputil\n\n## Functions\n\n```go\nfunc DelCookie(w http.ResponseWriter, r *http.Request, name string)\n```\nDelCookie deletes a cookie.\n\n```go\nfunc GetCookie(r *http.Request, name string) (value string)\n```\nGetCookie retrieves and verifies the cookie value.\n\n```go\nfunc GetHost(r *http.Request) string\n```\nGetHost is a helper function that evaluates the http.Request and returns the hostname. It is able to detect, using the X-Forarded-For header, the original hostname when routed through a reverse proxy.\n\n```go\nfunc GetScheme(r *http.Request) string\n```\nGetScheme is a helper function that evaluates the http.Request and returns the scheme, HTTP or HTTPS. It is able to detect, using the X-Forwarded-Proto, if the original request was HTTPS and routed through a reverse proxy with SSL termination.\n\n```go\nfunc GetURL(r *http.Request) string\n```\nGetURL is a helper function that evaluates the http.Request and returns the URL as a string. Only the scheme + hostname are included; the path is excluded.\n\n```go\nfunc IsHttps(r *http.Request) bool\n```\nIsHttps is a helper function that evaluates the http.Request and returns True if the Request uses HTTPS. It is able to detect, using the X-Forwarded-Proto, if the original request was HTTPS and routed through a reverse proxy with SSL termination.\n\n```go\nfunc SetCookie(w http.ResponseWriter, r *http.Request, name, value string)\n```\nSetCookie writes the cookie value.\n\n","path":"github.com/Coding/drone/shared/httputil","name":"httputil","synopsis":"","isRedistributable":true}
