httpbulb

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 7 Imported by: 0

README

httpbulb

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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"`
}

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