Documentation ¶
Overview ¶
Package http provides a imageserver.Server implementation that gets the Image from an HTTP URL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct { // Client is an optional HTTP client. // http.DefaultClient is used by default. Client *http.Client // Identify identifies the Image format. // By default, it uses IdentifyHeader(). Identify func(resp *http.Response, data []byte) (format string, err error) }
Server is a imageserver.Server implementation that gets the Image from an HTTP URL.
It parses the "source" param as URL, then do a GET request. It returns an error if the HTTP status code is not 200 (OK).
func (*Server) Get ¶
func (srv *Server) Get(params imageserver.Params) (*imageserver.Image, error)
Get implements imageserver.Server.
Click to show internal directories.
Click to hide internal directories.