Versions in this module Expand all Collapse all v0 v0.0.1 Jun 25, 2026 Changes in this version + var CarryClient = contextx.Carry[tCtxClient, client.Client] + var CarryHttpClient = contextx.Carry[tCtxHttpClient, *http.Client] + var CarryRoundTripperCreator = contextx.Carry[tCtxRoundTripperCreator, func() http.RoundTripper] + var ClientFrom = contextx.From[tCtxClient, client.Client] + var HttpClientFrom = contextx.From[tCtxHttpClient, *http.Client] + var MustClient = contextx.Must[tCtxClient, client.Client] + var MustHttpClient = contextx.Must[tCtxHttpClient, *http.Client] + var MustRoundTripperCreator = contextx.Must[tCtxRoundTripperCreator, func() http.RoundTripper] + var RoundTripperCreatorFrom = contextx.From[tCtxRoundTripperCreator, func() http.RoundTripper] + var WithClient = contextx.With[tCtxClient, client.Client] + var WithHttpClient = contextx.With[tCtxHttpClient, *http.Client] + var WithRoundTripperCreator = contextx.With[tCtxRoundTripperCreator, func() http.RoundTripper] + func AddHostAlias(aliases ...HostAlias) + func DefaultClientContext(ctx context.Context, transports ...HttpTransport) *http.Client + func DefaultShortConnectionClientContext(ctx context.Context, transports ...HttpTransport) *http.Client + func ListenAndServe(ctx context.Context, addr string, h http.Handler) error + func SetDefaultTLSClientConfig(c *tls.Config) + func WithHttpTransports(transports ...HttpTransport) func(rt http.RoundTripper) http.RoundTripper + type Client struct + EnableH2C bool + Endpoint string + NewError func() error + func (c *Client) Do(ctx context.Context, vreq any, metas ...httpx.Metadata) httpx.Result + func (c *Client) Init(ctx context.Context) error + func (c *Client) WithTransports(transports ...Transport) *Client + type DailContext func(ctx context.Context, network string, address string) (net.Conn, error) + type Error int8 + const ERROR_UNDEFINED + const ERROR__HOST_ALIAS_INVALID_INPUT + const ERROR__HOST_ALIAS_INVALID_IPV6_ADDR + func (e Error) Message() string + type HostAlias struct + Hostnames []string + IP net.IP + func ParseHostAlias(text string) (*HostAlias, error) + func (ha *HostAlias) UnmarshalText(data []byte) error + func (ha HostAlias) IsZero() bool + func (ha HostAlias) MarshalText() ([]byte, error) + func (ha HostAlias) String() string + type Hosts map[string]map[string]struct + func (hosts Hosts) AddHostAlias(alias HostAlias) + func (hosts Hosts) WrapDialContext(dc DailContext) DailContext + type HttpTransport = func(http.RoundTripper) http.RoundTripper + func HttpTransportFunc(round func(r *http.Request, next RoundTrip) (*http.Response, error)) HttpTransport + type RoundTrip = func(*http.Request) (*http.Response, error) + type Server struct + Addr string + Name string + func (s *Server) ApplyHandler(h http.Handler) + func (s *Server) Run(ctx context.Context) error + func (s *Server) Shutdown(ctx context.Context) error + func (s Server) Close(ctx context.Context) error + type Transport = func(rt http.RoundTripper) http.RoundTripper