http

package
v0.0.0-...-db335bc Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct{}

func (*Client) Do

func (c *Client) Do(req *http.Request) (*http.Response, error)

func (*Client) HandleFunc

func (c *Client) HandleFunc(path string, handler func(http.ResponseWriter, *http.Request))

func (*Client) ListenAndServe

func (c *Client) ListenAndServe(addr string, handler http.Handler) error

func (*Client) NewRequest

func (c *Client) NewRequest(method, url string, body io.Reader) (*http.Request, error)

type HttpClient

type HttpClient interface {
	Do(req *http.Request) (*http.Response, error)
	NewRequest(method, url string, body io.Reader) (*http.Request, error)
	HandleFunc(path string, handler func(http.ResponseWriter, *http.Request))
	ListenAndServe(addr string, handler http.Handler) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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