gosthttp

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package gosthttp provides functionality to bypass the TCP stack.

This includes the TestRoundTripper that provides an implementation of the http.RoundTripper interface which communicates directly with an http.Server instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpClient

func NewHttpClient() http.Client

func NewHttpClientFromHandler

func NewHttpClientFromHandler(handler http.Handler) http.Client

Types

type TestRoundTripper

type TestRoundTripper struct{ http.Handler }

A TestRoundTripper is an implementation of the http.RoundTripper interface that communicates directly with an http.Handler instance.

func (TestRoundTripper) RoundTrip

func (h TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL