requests

package
v0.0.0-...-58f9d26 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context map[string]interface{}

Context is a map that has special methods added for convenience

func (Context) Get

func (c Context) Get(key string, defaultValue ...interface{}) interface{}

Get is just an alias for accessing the value at the given key. This is just to keep things consistent. You could just as easily just do Context[key]. If you specify a default value, instead of being nil, the value returned will be the default when the key is not present.

func (Context) Set

func (c Context) Set(key string, value interface{}, noOverwrite ...bool)

Set sets a key-value association on the map. If true is passed as the third argument, this method will fail to set the value if there is already a value set for the given key

type Request

type Request struct {
	*http.Request
	Response  http.ResponseWriter
	Ctx       Context
	Session   *sessions.Session
	CSRFToken string
	Params    httprouter.Params
	Rendered  bool
}

Request is a wrapper containing the base request information along with context

Jump to

Keyboard shortcuts

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