httpbulb

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 12 Imported by: 0

README

httpbulb

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrotliHandle added in v0.2.0

func BrotliHandle(w http.ResponseWriter, r *http.Request)

func DeflateHandle added in v0.2.0

func DeflateHandle(w http.ResponseWriter, r *http.Request)

func GzipHandle added in v0.2.0

func GzipHandle(w http.ResponseWriter, r *http.Request)

func HeadersHandle added in v0.1.1

func HeadersHandle(w http.ResponseWriter, r *http.Request)

func IpHandle added in v0.1.1

func IpHandle(w http.ResponseWriter, r *http.Request)

func JsonError

func JsonError(w http.ResponseWriter, err string, code int)

func MethodsHandle added in v0.1.1

func MethodsHandle(w http.ResponseWriter, r *http.Request)

func NewRouter

func NewRouter() *chi.Mux

func RobotsHandle added in v0.2.0

func RobotsHandle(w http.ResponseWriter, r *http.Request)

func UserAgentHandle added in v0.1.1

func UserAgentHandle(w http.ResponseWriter, r *http.Request)

Types

type HeadersResponse added in v0.1.1

type HeadersResponse struct {
	Headers http.Header `json:"headers"`
}

type IpResponse added in v0.1.1

type IpResponse struct {
	Origin string `json:"origin"`
}

type MethodsResponse

type MethodsResponse struct {
	Args     map[string][]string `json:"args"`
	Data     string              `json:"data"`
	Files    map[string][]string `json:"files"`
	Form     map[string][]string `json:"form"`
	Headers  map[string][]string `json:"headers"`
	JSON     interface{}         `json:"json"`
	Origin   string              `json:"origin"`
	URL      string              `json:"url"`
	Gzipped  bool                `json:"gzipped,omitempty"`
	Brotli   bool                `json:"brotli,omitempty"`
	Deflated bool                `json:"deflated,omitempty"`
}

type StatusResponse added in v0.1.1

type StatusResponse struct {
	StatusText string `json:"status_text"`
}

type UserAgentResponse added in v0.1.1

type UserAgentResponse struct {
	UserAgent string `json:"user-agent"`
}

Jump to

Keyboard shortcuts

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