-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequest.go
41 lines (38 loc) · 1.16 KB
/
request.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package inter
import (
"github.com/confetti-framework/framework/support"
"net/http"
)
const RequestBodyDecoder = "request_body_decoder"
type Request interface {
App() App
SetApp(app App)
Make(abstract interface{}) interface{}
MakeE(abstract interface{}) (interface{}, error)
Body() string
SetBody(body string) Request
Source() http.Request
Header(key string) string
Headers() http.Header
Cookie(key string) string
CookieE(key string) (string, error)
File(key string) support.File
FileE(key string) (support.File, error)
Files(key string) []support.File
FilesE(key string) ([]support.File, error)
Method() string
Path() string
Url() string
FullUrl() string
Content(key ...string) support.Value
ContentE(keyInput ...string) (support.Value, error)
ContentOr(keys string, defaultValue interface{}) support.Value
Parameter(key string) support.Value
ParameterE(key string) (support.Value, error)
ParameterOr(key string, defaultValue interface{}) support.Value
SetUrlValues(vars map[string]string) Request
Query(key string) support.Value
QueryE(key string) (support.Value, error)
QueryOr(key string, defaultValue interface{}) support.Value
Route() Route
}