diff --git a/http.go b/http.go index 1e89e5c..6f975ef 100644 --- a/http.go +++ b/http.go @@ -14,7 +14,7 @@ import ( "time" ) -const Version = "1.0.8" +const Version = "1.0.9" // Response 返回内容 type Response struct { diff --git a/url.go b/url.go index 904f880..45e7ecd 100644 --- a/url.go +++ b/url.go @@ -6,8 +6,10 @@ import ( type ResponseUrlParse struct { Scheme string `json:"scheme"` // 协议 + Host string `json:"host"` // 主机 Hostname string `json:"hostname"` // 主机名 Port string `json:"port"` // 端口 + HostPath string `json:"host_path"` // 主机加路径 Path string `json:"path"` // 路径 RawQuery string `json:"raw_query"` // 参数 ? Fragment string `json:"fragment"` // 片段 # @@ -20,8 +22,10 @@ func UrlParse(inputUrl string) (resp ResponseUrlParse) { return } resp.Scheme = parse.Scheme + resp.Host = parse.Host resp.Hostname = parse.Hostname() resp.Port = parse.Port() + resp.HostPath = parse.Host + parse.Path resp.Path = parse.Path resp.RawQuery = parse.RawQuery resp.Fragment = parse.Fragment