Documentation ¶
Overview ¶
* @Author: nijineko * @Date: 2024-08-30 16:37:03 * @LastEditTime: 2024-08-30 17:09:25 * @LastEditors: nijineko * @Description: 表单处理封装 * @FilePath: \yuzuhttp\request\multipartForm\multipartForm.go
Index ¶
- type Form
- func (m *Form) AddField(Key, Value string) *Form
- func (m *Form) AddFile(Key string, Filename string, Value []byte) *Form
- func (m *Form) BuildBody() (*bytes.Buffer, string, error)
- func (m *Form) Get(Key string) []byte
- func (m *Form) GetBoundary() string
- func (m *Form) Remove(Key string)
- func (m *Form) SetBoundary(Boundary string) *Form
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Form ¶
type Form struct {
// contains filtered or unexported fields
}
Multipart表单结构
func (*Form) AddField ¶
*
- @description: 表单添加字段
- @param {string} Key Key
- @param {string} Value Value
- @return {*multipartForm} Multipart表单
func (*Form) AddFile ¶
*
- @description: 表单添加文件
- @param {string} Key
- @param {[]byte} Value
- @param {string} Filename
- @return {*}
func (*Form) SetBoundary ¶
*
- @description: 设置分隔符
- @param {string} Boundary 分隔符
- @return {*Form} Multipart表单
Click to show internal directories.
Click to hide internal directories.