request

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationJSON = "application/json"
	ContentType     = "Content-Type"
	ContentLength   = "Content-Length"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Multipart

type Multipart struct {
	// contains filtered or unexported fields
}

func NewMultipart

func NewMultipart(ctx context.Context, c *http.Client, method, url string) *Multipart

func (*Multipart) Bool

func (r *Multipart) Bool(fieldName string, value bool) *Multipart

func (*Multipart) Err

func (r *Multipart) Err() error

func (*Multipart) File

func (r *Multipart) File(key, filename string, content io.Reader) *Multipart

func (*Multipart) Float

func (r *Multipart) Float(fieldName string, value float64) *Multipart

func (*Multipart) Header

func (r *Multipart) Header(key, value string) *Multipart

func (*Multipart) Param

func (r *Multipart) Param(key, value string) *Multipart

func (*Multipart) Send

func (r *Multipart) Send() (*http.Response, error)

type Request

type Request struct {
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest(ctx context.Context, c *http.Client, method, url string) *Request

func (*Request) Body

func (r *Request) Body(body io.ReadCloser) *Request

func (*Request) Bool

func (r *Request) Bool(fieldName string, value bool) *Request

func (*Request) Bytes

func (r *Request) Bytes(body []byte) *Request

func (*Request) Err

func (r *Request) Err() error

func (*Request) Float

func (r *Request) Float(fieldName string, value float64) *Request

func (*Request) Header

func (r *Request) Header(key, value string) *Request

func (*Request) JSON

func (r *Request) JSON(body any) *Request

func (*Request) Param

func (r *Request) Param(key, value string) *Request

func (*Request) Send

func (r *Request) Send() (*http.Response, error)

Jump to

Keyboard shortcuts

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