MCPcopy Create free account

hub / github.com/ahmetb/go-httpbin / functions

Functions94 in github.com/ahmetb/go-httpbin

↓ 42 callersFunctiontestServer
()
handlers_test.go:32
↓ 14 callersFunctionwriteErrorJSON
(w http.ResponseWriter, err error)
util.go:18
↓ 12 callersFunctionget
(t *testing.T, url string)
handlers_test.go:63
↓ 11 callersFunctionassertLocationHeader
(t *testing.T, u, expected string)
handlers_test.go:88
↓ 11 callersFunctionwriteJSON
(w io.Writer, v interface{})
util.go:12
↓ 6 callersFunctiongetHeaders
(r *http.Request)
util.go:23
↓ 6 callersFunctionnoRedirectClient
()
handlers_test.go:37
↓ 4 callersFunctionnoFollowGet
(cl *http.Client, u string)
handlers_test.go:44
↓ 3 callersMethodBrightness
(x, y float64)
handlers.go:533
↓ 3 callersFunctionGetHandler
GetHandler returns user agent.
handlers.go:122
↓ 2 callersFunctionbasicAuthHandler
(w http.ResponseWriter, r *http.Request, status int)
handlers.go:499
↓ 2 callersFunctionflattenValues
(uv url.Values)
util.go:39
↓ 2 callersFunctiongetImg
()
handlers.go:604
↓ 2 callersFunctionnoFollow
(method string, cl *http.Client, u string)
handlers_test.go:48
↓ 2 callersFunctionreq
(t *testing.T, url, method string, body []byte)
handlers_test.go:71
↓ 1 callersFunctiongetCookies
(cs []*http.Cookie)
util.go:31
↓ 1 callersFunctionparseData
(r *http.Request)
handlers.go:670
↓ 1 callersFunctionpost
(t *testing.T, url string, body []byte)
handlers_test.go:67
FunctionAbsoluteRedirectHandler
AbsoluteRedirectHandler returns a 302 Found response if n=1 pointing to /host/get, otherwise to /host/absolute-redirect/(n-1)
handlers.go:186
FunctionBasicAuthHandler
BasicAuthHandler challenges with given username and password.
handlers.go:489
FunctionBrotliHandler
BrotliHandler returns a Brotli-encoded response
handlers.go:447
FunctionBytesHandler
BytesHandler returns n random bytes of binary data and accepts an optional 'seed' integer query parameter.
handlers.go:255
FunctionCacheHandler
CacheHandler returns 200 with the response of /get unless an If-Modified-Since or If-None-Match header is provided, when it returns a 304.
handlers.go:393
FunctionCookiesHandler
CookiesHandler returns the cookies provided in the request.
handlers.go:313
FunctionDeflateHandler
DeflateHandler returns a DEFLATE-encoded response.
handlers.go:429
FunctionDelayHandler
DelayHandler delays responding for min(n, 10) seconds and responds with /get endpoint
handlers.go:281
FunctionDeleteCookiesHandler
DeleteCookiesHandler deletes cookies with provided query value keys in the response by settings a Unix epoch expiration date and returns a 302 redirec
handlers.go:337
FunctionDenyHandler
DenyHandler returns a plain-text response.
handlers.go:472
FunctionDripHandler
DripHandler drips data over a duration after an optional initial delay, then optionally returns with the given status code.
handlers.go:353
FunctionExampleGetMux_httptest
()
example_test.go:13
FunctionExampleGetMux_server
()
example_test.go:32
FunctionGIFHandler
GIFHandler returns an animated GIF image. Source: http://tech.nitoyon.com/en/blog/2016/01/07/go-animated-gif-gen/
handlers.go:544
FunctionGZIPHandler
GZIPHandler returns a GZIP-encoded response
handlers.go:410
FunctionGetMux
GetMux returns the mux with handlers for httpbin endpoints registered.
handlers.go:43
FunctionHTMLHandler
HTMLHandler returns some HTML response.
handlers.go:518
FunctionHeadersHandler
HeadersHandler returns user agent.
handlers.go:115
FunctionHiddenBasicAuthHandler
HiddenBasicAuthHandler challenges with given username and password and returns 404 if authentication fails.
handlers.go:495
FunctionHomeHandler
HomeHandler serves static HTML content for the index page.
handlers.go:83
FunctionIPHandler
IPHandler returns Origin IP.
handlers.go:100
FunctionJPEGHandler
JPEGHandler returns a JPEG image.
handlers.go:595
FunctionPNGHandler
PNGHandler returns a PNG image.
handlers.go:600
FunctionPostHandler
PostHandler accept a post and echo its data back
handlers.go:137
FunctionRedirectHandler
RedirectHandler returns a 302 Found response if n=1 pointing to /get, otherwise to /redirect/(n-1)
handlers.go:170
FunctionRedirectToHandler
RedirectToHandler returns a 302 Found response pointing to the url query parameter
handlers.go:203
FunctionRobotsTXTHandler
RobotsTXTHandler returns a robots.txt response.
handlers.go:466
FunctionSetCacheHandler
SetCacheHandler sets a Cache-Control header for n seconds and returns with the /get response.
handlers.go:403
FunctionSetCookiesHandler
SetCookiesHandler sets the query key/value pairs as cookies in the response and returns a 302 redirect to /cookies.
handlers.go:321
FunctionStatusHandler
StatusHandler returns a proper response for provided status code
handlers.go:210
FunctionStreamHandler
StreamHandler writes a json object to a new line every second.
handlers.go:294
FunctionTestAbsoluteRedirect
(t *testing.T)
handlers_test.go:194
FunctionTestBasicAuthHandler_badCreds
(t *testing.T)
handlers_test.go:631
FunctionTestBasicAuthHandler_correctCreds
(t *testing.T)
handlers_test.go:643
FunctionTestBasicAuthHandler_noAuth
(t *testing.T)
handlers_test.go:621
FunctionTestBrotli
(t *testing.T)
handlers_test.go:574
FunctionTestBytes_noSeed
(t *testing.T)
handlers_test.go:286
FunctionTestBytes_seed
(t *testing.T)
handlers_test.go:296
FunctionTestBytes_size
(t *testing.T)
handlers_test.go:267
FunctionTestCache_ifModifiedSince
(t *testing.T)
handlers_test.go:480
FunctionTestCache_ifNoneMatch
(t *testing.T)
handlers_test.go:493
FunctionTestCache_none
(t *testing.T)
handlers_test.go:506
FunctionTestCookies
(t *testing.T)
handlers_test.go:374
FunctionTestDeflate
(t *testing.T)
handlers_test.go:554
FunctionTestDelay_limited
(t *testing.T)
handlers_test.go:317
FunctionTestDelay_supportsFloat
(t *testing.T)
handlers_test.go:306
FunctionTestDeleteCookies
(t *testing.T)
handlers_test.go:427
FunctionTestDeny
(t *testing.T)
handlers_test.go:611
FunctionTestDrip_code
(t *testing.T)
handlers_test.go:467
FunctionTestGIF
(t *testing.T)
handlers_test.go:765
FunctionTestGZIP
(t *testing.T)
handlers_test.go:529
FunctionTestGet
(t *testing.T)
handlers_test.go:140
FunctionTestHTML
(t *testing.T)
handlers_test.go:705
FunctionTestHeaders
(t *testing.T)
handlers_test.go:128
FunctionTestHiddenBasicAuthHandler_badCreds
(t *testing.T)
handlers_test.go:673
FunctionTestHiddenBasicAuthHandler_correctCreds
(t *testing.T)
handlers_test.go:685
FunctionTestHiddenBasicAuthHandler_noAuth
(t *testing.T)
handlers_test.go:663
FunctionTestHome
(t *testing.T)
handlers_test.go:96
FunctionTestIP
(t *testing.T)
handlers_test.go:104
FunctionTestJPEG
(t *testing.T)
handlers_test.go:753
FunctionTestPNG
(t *testing.T)
handlers_test.go:777
FunctionTestPost
(t *testing.T)
handlers_test.go:159
FunctionTestRedirect
(t *testing.T)
handlers_test.go:184
FunctionTestRedirectTo
(t *testing.T)
handlers_test.go:204
FunctionTestRobotsTXT
(t *testing.T)
handlers_test.go:598
FunctionTestSetCache_none
(t *testing.T)
handlers_test.go:517
FunctionTestSetCookies
(t *testing.T)
handlers_test.go:402
FunctionTestStatus_3xxLocationHeader
(t *testing.T)
handlers_test.go:253
FunctionTestStatus_assertValidCodes
(t *testing.T)
handlers_test.go:213
FunctionTestStatus_invalidCodeWorks
(t *testing.T)
handlers_test.go:242
FunctionTestStream
(t *testing.T)
handlers_test.go:332
FunctionTestUserAgent
(t *testing.T)
handlers_test.go:116
FunctionTestXML
(t *testing.T)
handlers_test.go:719
FunctionUserAgentHandler
UserAgentHandler returns user agent.
handlers.go:108
FunctionXMLHandler
XMLHandler returns some XML response.
handlers.go:524
Functionmain
()
cmd/httpbin/main.go:15