mirror of
https://github.com/weloe/token-go.git
synced 2025-10-05 23:46:52 +08:00
20 lines
584 B
Go
20 lines
584 B
Go
package ctx
|
|
|
|
type Request interface {
|
|
Source() interface{}
|
|
// Header get from request header
|
|
Header(key string) string
|
|
// PostForm get value from postForm
|
|
PostForm(key string) string
|
|
// Query https://example.org/?a=1&a=2&b=&=3&&&&" Query(a) return 1
|
|
Query(key string) string
|
|
// Path https://example.org/ex?a=1&a=2&b=&=3&&&& Path() return /ex
|
|
Path() string
|
|
// Url https://example.org//?a=1&a=2&b=&=3&&&& Url() return https://example.org/?a=1&a=2&b=&=3&&&&
|
|
Url() string
|
|
// Method request method
|
|
Method() string
|
|
// Cookie get value from cookie
|
|
Cookie(key string) string
|
|
}
|