Documentation ¶
Overview ¶
Package http is a wrapper packages of net/http for net-upnp-go.
Index ¶
Constants ¶
View Source
const ( GET = "GET" POST = "POST" SUBSCRIBE = "SUBSCRIBE" UNSUBSCRIBE = "UNSUBSCRIBE" UserAgent = "User-Agent" ContentType = "Content-Type" ServerHeader = "Server" SOAPAction = "SOAPACTION" SOAPActionDelim = "#" ContentTypeXML = "text/xml; charset=\"utf-8\"" )
View Source
const ( DefaultTimeout = 60 MaxHeaderBytes = 1 << 20 )
View Source
const ( StatusOK = gohttp.StatusOK StatusBadRequest = gohttp.StatusBadRequest StatusNotFound = gohttp.StatusNotFound StatusPreconditionFailed = gohttp.StatusPreconditionFailed StatusInternalServerError = gohttp.StatusInternalServerError )
Variables ¶
This section is empty.
Functions ¶
func GetServerName ¶
func GetServerName() string
func StatusCodeToString ¶
Types ¶
type Request ¶
A Request represents a Request.
func NewRequest ¶
NewRequest returns a new Request.
func NewRequestFromRequest ¶
NewRequest returns a new Request.
func NewSOAPRequest ¶
NewSOAPRequest returns a new Request.
func (*Request) GetSOAPServiceActionName ¶
func (*Request) IsSOAPRequest ¶
type RequestListener ¶
type RequestListener interface {
HTTPRequestReceived(*Request, ResponseWriter)
}
A SSDPListener represents a listener for Server.
type Response ¶
A Response represents a Response.
func NewResponse ¶
NewResponse returns a new Response.
func NewResponseFromResponse ¶
NewResponse returns a new Response.
type ResponseWriter ¶
type ResponseWriter interface { gohttp.ResponseWriter }
A ResponseWriter represents a ResponseWriter.
Click to show internal directories.
Click to hide internal directories.