summaryrefslogtreecommitdiff
path: root/types/http.go
blob: 5fac0e80da06941986e834760f1e7ffb846276f4 (plain)
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
package types

type HTTPMethod string

const (
	GET     HTTPMethod = "GET"
	POST    HTTPMethod = "POST"
	PUT     HTTPMethod = "PUT"
	PATCH   HTTPMethod = "PATCH"
	DELETE  HTTPMethod = "DELETE"
	OPTIONS HTTPMethod = "OPTIONS"
	HEAD    HTTPMethod = "HEAD"
)

type HTTPQueryParam struct {
	Key   string
	Value string
}

type HTTPRequest struct {
	Path        string
	Method      string
	Query       []HTTPQueryParam
	Params      []HTTPQueryParam
	QueryString string
	IP          string
	URL         string
}