enctype

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// UrlEncoded Default encoding for form data. Text fields are URL-encoded as key-value pairs.
	// Suitable for simple forms without file uploads.
	UrlEncoded = EncType("application/x-www-form-urlencoded")

	// MultipartFormData Required for file uploads and binary data. Each form field becomes a separate part
	// of the multipart message. Essential when form contains file input elements.
	MultipartFormData = EncType("multipart/form-data")

	// TextPlain Plain text encoding without URL encoding. Primarily for debugging purposes.
	// Not recommended for production forms due to limited browser support.
	TextPlain = EncType("text/plain")
)

Variables for EncType values

Functions

This section is empty.

Types

type EncType

type EncType []byte

EncType MIME type for form data encoding when method is POST. Controls how form data is packaged and sent to the server, affecting file upload capability and data format.

func Custom

func Custom(value string) EncType

Custom allows setting a custom EncType value for edge cases or future specifications. Use this when the predefined constants don't cover your specific use case.

Jump to

Keyboard shortcuts

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