Documentation
¶
Index ¶
- Constants
- type DataType
- type Multipart
- func (r *Multipart) Bool(key string, value bool) *Multipart
- func (r *Multipart) File(key, filename string, content io.Reader) *Multipart
- func (r *Multipart) Float(key string, value float64) *Multipart
- func (r *Multipart) Header(key, value string) *Multipart
- func (r *Multipart) Int(key string, value int) *Multipart
- func (r *Multipart) Param(key, value string) *Multipart
- func (r *Multipart) Send() (*http.Response, error)
- func (r *Multipart) Timeout(duration time.Duration) *Multipart
- type Request
- func (r *Request) Body(body io.ReadCloser, contentType string) *Request
- func (r *Request) Bool(key string, value bool) *Request
- func (r *Request) Float(key string, value float64) *Request
- func (r *Request) Header(key, value string) *Request
- func (r *Request) Int(key string, value int) *Request
- func (r *Request) JSON(data any) *Request
- func (r *Request) Param(key, value string) *Request
- func (r *Request) Send() (*http.Response, error)
- func (r *Request) Timeout(duration time.Duration) *Request
Constants ¶
View Source
const ( ApplicationJSON = "application/json" ContentType = "Content-Type" )
HTTP header constants used throughout the request package.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Multipart ¶
type Multipart struct {
// contains filtered or unexported fields
}
Multipart provides a streaming multipart/form-data builder for HTTP requests.
func NewMultipart ¶
NewMultipart creates a new streaming multipart/form-data request builder.
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request provides a builder for standard HTTP requests.
func NewRequest ¶
NewRequest creates a new HTTP request builder.
func (*Request) Body ¶
func (r *Request) Body(body io.ReadCloser, contentType string) *Request
Body sets the request body and Content-Type header.
Click to show internal directories.
Click to hide internal directories.