1 Star 1 Fork 0

kin9-0rz / goapk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
pcap_http.go 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
package pcap
// HTTPRequest 存放一次HTTP请求,及其数据。
type HTTPRequest struct {
URL string `json:"URL,omitempty"` // url,不包含 ://
Method string `json:"Method,omitempty"` // GET POST 等请求方法
RequestData string `json:"RequestData,omitempty"` // 请求数据,包含请求方法、头部、请求体
ResponeData string `json:"ResponeData,omitempty"` // 响应数据
}
// NewHTTPRequest init
func NewHTTPRequest() HTTPRequest {
return HTTPRequest{}
}
// SetURL set
func (r *HTTPRequest) SetURL(url string) {
r.URL = url
}
// GetURL get
func (r *HTTPRequest) GetURL() string {
return r.URL
}
// SetMethod set
func (r *HTTPRequest) SetMethod(mtd string) {
r.Method = mtd
}
// GetMethod get
func (r *HTTPRequest) GetMethod() string {
return r.Method
}
// SetResponeContentType set
func (r *HTTPRequest) SetResponeData(rd string) {
r.ResponeData = rd
}
// GetResponeData get
func (r *HTTPRequest) GetResponeData() string {
return r.ResponeData
}
// SetResponeData set
func (r *HTTPRequest) SetRequestData(rd string) {
r.RequestData = rd
}
// GetRequestData get
func (r *HTTPRequest) GetRequestData() string {
return r.RequestData
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/kin9-0rz/goapk.git
git@gitee.com:kin9-0rz/goapk.git
kin9-0rz
goapk
goapk
v1.1.5

搜索帮助

344bd9b3 5694891 D2dac590 5694891