github.com/kaiya/goutils@v1.0.1-0.20230226104005-4ae4a4dc3688/http/http.go (about)

     1  package http
     2  
     3  import (
     4  	"bufio"
     5  	"context"
     6  	"io"
     7  	"net"
     8  	"net/url"
     9  )
    10  
    11  type Response struct {
    12  	conn       *net.Conn
    13  	Req        *Request
    14  	Header     map[string][]string
    15  	StatusCode int
    16  	reqBody    io.ReadCloser
    17  	// Body
    18  	w *bufio.Writer
    19  }
    20  
    21  type Request struct {
    22  	Proto   string
    23  	Url     *url.URL
    24  	Header  map[string][]string
    25  	Method  string
    26  	Payload []byte
    27  	Body    io.ReadCloser
    28  	Host    string
    29  	Ctx     context.Context
    30  }