request

package
v0.0.0-...-4065494 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// CommandGet is a request command assigned to http "GET" method.
	CommandGet = NewRequestCommand(http.MethodGet)
	// CommandHead is a request command assigned to http "HEAD" method.
	CommandHead = NewRequestCommand(http.MethodHead)
	// CommandPost is a request command assigned to http "POST" method.
	CommandPost = NewRequestCommand(http.MethodPost)
	// CommandPut is a request command assigned to http "PUT" method.
	CommandPut = NewRequestCommand(http.MethodPut)
	// CommandPatch is a request command assigned to http "PATCH" method.
	CommandPatch = NewRequestCommand(http.MethodPatch)
	// CommandDelete is a request command assigned to http "DELETE" method.
	CommandDelete = NewRequestCommand(http.MethodDelete)
	// CommandConnect is a request command assigned to http "CONNECT" method.
	CommandConnect = NewRequestCommand(http.MethodConnect)
	// CommandOptions is a request command assigned to http "OPTIONS" method.
	CommandOptions = NewRequestCommand(http.MethodOptions)
	// CommandTrace is a request command assigned to http "TRACE" method.
	CommandTrace = NewRequestCommand(http.MethodTrace)
)

Functions

func NewRequestCallback

func NewRequestCallback(method string) commands.Callback

NewRequestCallback returns a new Request Callback by the given http method.

func NewRequestCommand

func NewRequestCommand(method string) *commands.Command

NewRequestCommand returns a new Request Command by the given http method.

func PerformRequest

func PerformRequest(method string, bot *tbot.BotAPI, msg tbot.Update) error

PerformRequest creates and sends a new http request configured by the set of arguments in the message.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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