http

package module
v0.0.0-...-9c79ff2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 6 Imported by: 0

README

http

This package is very low-level client of both http/1.0 and http/1.1 that is similar to net/http but also enables you to analyze and modify raw http requests and responses.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Msg

type Msg struct {
	Headers []string
	Body    io.Reader
}

func ReadMsg

func ReadMsg(r io.Reader) (*Msg, error)

ReadMsg parses and reads a message from r.

func (*Msg) Reader

func (r *Msg) Reader() io.Reader

Reader returns a Reader to read the formatted message.

func (*Msg) Send

func (req *Msg) Send(conn net.Conn) (*Msg, error)

Send sends an http request.

func (*Msg) Transform

func (r *Msg) Transform(t transform.Transformer) (*Msg, error)

Transform returns the transformed message.

func (*Msg) Write

func (r *Msg) Write(w io.Writer) error

Write writes the formatted message to w.

Jump to

Keyboard shortcuts

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