-
Notifications
You must be signed in to change notification settings - Fork 0
/
codec.go
32 lines (28 loc) · 940 Bytes
/
codec.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
package hhttp
const (
// MethodGet HTTP method
GET = "GET"
// MethodPost HTTP method
POST = "POST"
// MethodPut HTTP method
PUT = "PUT"
// MethodDelete HTTP method
DELETE = "DELETE"
// MethodDelete HTTP method
PATCH = "PATCH"
)
const (
SerializationType string = "Content-Type"
// SerializationTypeFormData 常见在表单的文件上传
SerializationTypeFormData string = "multipart/form-data"
SerializationTypeJSON string = "application/json"
SerializationTypeWWWFrom string = "application/x-www-form-urlencoded"
// SerializationTypePlainText 用于请求和响应文本数据。
SerializationTypePlainText string = "text/plain; charset=utf-8"
// SerializationTypeImageGIF gif图片
SerializationTypeImageGIF string = "image/gif"
// SerializationTypeImageJPEG jpeg图片
SerializationTypeImageJPEG string = "image/jpeg"
// SerializationTypeImagePNG png图片
SerializationTypeImagePNG string = "image/png"
)