formdata

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(value any) (data []byte, contentType string, err error)

Marshal encodes the given value into a multipart/form-data request body. The value must be a struct or a pointer to a struct. If the field implements the File interface, the field is marshaled as a file.

Types

type File

type File interface {
	Name() string
	io.Reader
}

File represents a file to be marshaled into a multipart/form-data request body.

Jump to

Keyboard shortcuts

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