- 分离 Request 的配置态与执行态,修复二次 Do、raw 模式网络配置失效和 body 来源互斥问题 - 新增 starnet trace 抽象,补齐 DNS/连接/TLS/重试事件,并优化动态 transport 缓存与代理解析路径 - 收紧非法代理为 fail-fast,多目标目标回退仅限幂等请求,修复 Host/TLS/SNI 等语义边界 - 补充防御性拷贝、专项回归测试、本地代理/TLS 用例与 README 行为说明
32 lines
965 B
Go
32 lines
965 B
Go
package starnet
|
|
|
|
// AddQuery 添加查询参数
|
|
func (r *Request) AddQuery(key, value string) *Request {
|
|
return r.applyMutation(mutateAddQuery(key, value))
|
|
}
|
|
|
|
// SetQuery 设置查询参数(覆盖)
|
|
func (r *Request) SetQuery(key, value string) *Request {
|
|
return r.applyMutation(mutateSetQuery(key, value))
|
|
}
|
|
|
|
// SetQueries 设置所有查询参数(覆盖)
|
|
func (r *Request) SetQueries(queries map[string][]string) *Request {
|
|
return r.applyMutation(mutateSetQueries(queries))
|
|
}
|
|
|
|
// AddQueries 批量添加查询参数
|
|
func (r *Request) AddQueries(queries map[string]string) *Request {
|
|
return r.applyMutation(mutateAddQueries(queries))
|
|
}
|
|
|
|
// DeleteQuery 删除查询参数
|
|
func (r *Request) DeleteQuery(key string) *Request {
|
|
return r.applyMutation(mutateDeleteQuery(key))
|
|
}
|
|
|
|
// DeleteQueryValue 删除查询参数的特定值
|
|
func (r *Request) DeleteQueryValue(key, value string) *Request {
|
|
return r.applyMutation(mutateDeleteQueryValue(key, value))
|
|
}
|