httpsource

package
v0.0.0-...-60e87b8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package httpsource provides a HTTP source Image Server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// Client is an optional HTTP client.
	// http.DefaultClient is used by default.
	Client *http.Client
}

Server is a HTTP source Image Server.

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).

The image type is determined by the "Content-Type" header.

func (*Server) Get

func (srv *Server) Get(params imageserver.Params) (*imageserver.Image, error)

Get implements Server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL