constants

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package constants provides common constants used throughout the application.

Index

Constants

View Source
const (
	HeaderContentType     = "Content-Type"
	HeaderAuthorization   = "Authorization"
	HeaderAccept          = "Accept"
	HeaderAcceptEncoding  = "Accept-Encoding"
	HeaderCacheControl    = "Cache-Control"
	HeaderContentLength   = "Content-Length"
	HeaderContentEncoding = "Content-Encoding"
	HeaderCookie          = "Cookie"
	HeaderSetCookie       = "Set-Cookie"
	HeaderUserAgent       = "User-Agent"
	HeaderHost            = "Host"
	HeaderConnection      = "Connection"
	HeaderLocation        = "Location"
)

HTTP Header names (canonical form)

View Source
const (
	MIMEApplicationJSON           = "application/json"
	MIMEApplicationXML            = "application/xml"
	MIMEApplicationFormURLEncoded = "application/x-www-form-urlencoded"
	MIMEMultipartFormData         = "multipart/form-data"
	MIMETextPlain                 = "text/plain"
	MIMETextHTML                  = "text/html"
	MIMETextXML                   = "text/xml"
	MIMEOctetStream               = "application/octet-stream"
)

MIME types

View Source
const (
	AuthSchemeBearer = "Bearer"
	AuthSchemeBasic  = "Basic"
	AuthSchemeDigest = "Digest"
)

Authentication schemes

View Source
const (
	MethodGET     = "GET"
	MethodPOST    = "POST"
	MethodPUT     = "PUT"
	MethodDELETE  = "DELETE"
	MethodPATCH   = "PATCH"
	MethodHEAD    = "HEAD"
	MethodOPTIONS = "OPTIONS"
)

HTTP Methods

View Source
const (
	ExtHTTP = ".http"
	ExtREST = ".rest"
	ExtJSON = ".json"
	ExtEnv  = ".env"
)

File extensions

View Source
const (
	DefaultUserAgent = "restclient-cli"
	DefaultTimeout   = 0 // No timeout
)

Default values

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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