Documentation ¶
Index ¶
- func Cut(s, sep string) (before, after string, found bool)
- type H2C
- type HTTP1
- func (t HTTP1) ReadResponse(ctx context.Context, r io.ReadCloser, req *http.PreparedRequest, ...) (err error)
- func (t HTTP1) RoundTrip(ctx context.Context, rw io.ReadWriteCloser, req *http.PreparedRequest, ...) error
- func (t HTTP1) WriteRequest(ctx context.Context, w io.Writer, r *http.PreparedRequest) error
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type H2C ¶
type H2C struct{}
func (H2C) ReadResponse ¶
func (H2C) RoundTrip ¶
func (t H2C) RoundTrip(ctx context.Context, rw io.ReadWriteCloser, req *http.PreparedRequest, resp *http.Response) error
func (H2C) WriteRequest ¶
type HTTP1 ¶
type HTTP1 struct{}
func (HTTP1) ReadResponse ¶
func (t HTTP1) ReadResponse(ctx context.Context, r io.ReadCloser, req *http.PreparedRequest, resp *http.Response) (err error)
func (HTTP1) RoundTrip ¶
func (t HTTP1) RoundTrip(ctx context.Context, rw io.ReadWriteCloser, req *http.PreparedRequest, resp *http.Response) error
func (HTTP1) WriteRequest ¶
type Transport ¶
type Transport interface {
RoundTrip(ctx context.Context, rw io.ReadWriteCloser, req *http.PreparedRequest, resp *http.Response) error
}
Transports holds an actions that Write [http.PreparedRequest]s to an underlying io.WriteCloser and then Read [http.Response]s from an io.ReadCloser which is supposedly the same connection the request is sent to. The Transport implementation should Close the io.WriteCloser after the entire request is sent and Close the io.ReadCloser after the entire response is read, including the request body. the Closer for the Response is usually hooked with the Body Closer returned to the user.
Transports SHOULD NOT hold states.
Click to show internal directories.
Click to hide internal directories.