http

package
v0.3.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: MIT Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoRequestBodyDecoderFoundError = errors.New("unsupported content type").
	Status(net.StatusUnsupportedMediaType).
	Level(log_level.DEBUG)

Functions

func NewRequest added in v0.3.1

func NewRequest(options Options) inter.Request

Types

type Kernel

type Kernel struct {
	App *inter.App
}

func (Kernel) Handle

func (k Kernel) Handle(request inter.Request) inter.Response

Handle an incoming HTTP request.

type Options added in v0.3.1

type Options struct {
	App     inter.App
	Source  http.Request
	Method  string
	Host    string
	Url     string
	Header  http.Header
	Form    url.Values
	Content string
	Route   *mux.Route
	Body    io.ReadCloser
}

type Request added in v0.3.1

type Request struct {
	// contains filtered or unexported fields
}

func (Request) App added in v0.3.1

func (r Request) App() inter.App

func (Request) Body added in v0.3.1

func (r Request) Body() string

func (*Request) Content added in v0.3.1

func (r *Request) Content(keyInput ...string) support.Value

func (*Request) ContentE added in v0.3.1

func (r *Request) ContentE(keyInput ...string) (support.Value, error)

func (Request) ContentOr added in v0.3.1

func (r Request) ContentOr(key string, defaultValue interface{}) support.Value

func (Request) Cookie added in v0.3.1

func (r Request) Cookie(key string) string

func (Request) CookieE added in v0.3.1

func (r Request) CookieE(key string) (string, error)

func (*Request) File added in v0.3.1

func (r *Request) File(key string) support.File

func (*Request) FileE added in v0.3.1

func (r *Request) FileE(key string) (support.File, error)

func (*Request) Files added in v0.3.1

func (r *Request) Files(key string) []support.File

func (*Request) FilesE added in v0.3.1

func (r *Request) FilesE(key string) ([]support.File, error)

func (Request) FullUrl added in v0.3.1

func (r Request) FullUrl() string

func (Request) Header added in v0.3.1

func (r Request) Header(key string) string

func (Request) Headers added in v0.3.1

func (r Request) Headers() http.Header

func (*Request) Make added in v0.3.1

func (r *Request) Make(abstract interface{}) interface{}

func (*Request) MakeE added in v0.3.1

func (r *Request) MakeE(abstract interface{}) (interface{}, error)

func (Request) Method added in v0.3.1

func (r Request) Method() string

func (Request) Parameter added in v0.3.1

func (r Request) Parameter(key string) support.Value

func (Request) ParameterE added in v0.3.1

func (r Request) ParameterE(key string) (support.Value, error)

func (Request) ParameterOr added in v0.3.1

func (r Request) ParameterOr(key string, defaultValue interface{}) support.Value

func (Request) Path added in v0.3.1

func (r Request) Path() string

func (Request) Query added in v0.3.1

func (r Request) Query(key string) support.Value

func (Request) QueryE added in v0.3.1

func (r Request) QueryE(key string) (support.Value, error)

func (Request) QueryOr added in v0.3.1

func (r Request) QueryOr(key string, defaultValue interface{}) support.Value

func (Request) Route added in v0.3.1

func (r Request) Route() inter.Route

func (*Request) SetApp added in v0.3.1

func (r *Request) SetApp(app inter.App)

func (*Request) SetBody added in v0.3.1

func (r *Request) SetBody(body string) inter.Request

func (*Request) SetUrlValues added in v0.3.1

func (r *Request) SetUrlValues(vars map[string]string) inter.Request

func (Request) Source added in v0.3.1

func (r Request) Source() http.Request

func (Request) Url added in v0.3.1

func (r Request) Url() string

type Router added in v0.3.1

type Router struct {
	// contains filtered or unexported fields
}

func NewRouter added in v0.3.1

func NewRouter(app inter.App) Router

func (Router) DispatchToRoute added in v0.3.1

func (r Router) DispatchToRoute(request inter.Request) inter.Response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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