http

package
v0.0.0-...-375d9ab Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

This file has automatically been generated on Wed Feb 26 15:50:43 +05 2020. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalHeaderKey

func CanonicalHeaderKey(s string) string

func ClientDo

func ClientDo(c *http.Client, req *http.Request) (*http.Response, error)

func ClientGet

func ClientGet(c *http.Client, url string) (*http.Response, error)

func ClientHead

func ClientHead(c *http.Client, url string) (*http.Response, error)

func ClientPost

func ClientPost(c *http.Client, url, contentType string, body io.Reader) (*http.Response, error)

func ClientPostForm

func ClientPostForm(c *http.Client, url string, data url.Values) (*http.Response, error)

func ConnStateString

func ConnStateString(c http.ConnState) string

func CookieString

func CookieString(c *http.Cookie) string

func DetectContentType

func DetectContentType(data []byte) string

func DirOpen

func DirOpen(d http.Dir, name string) (http.File, error)

func FileServer

func FileServer(root http.FileSystem) http.Handler

func Get

func Get(url string) (*http.Response, error)
func Head(url string) (*http.Response, error)

func HeaderClone

func HeaderClone(h http.Header) http.Header

func HeaderGet

func HeaderGet(h http.Header, key string) string

func HeaderValues

func HeaderValues(h http.Header, key string) []string

func HeaderWrite

func HeaderWrite(h http.Header, w io.Writer) error

func HeaderWriteSubset

func HeaderWriteSubset(h http.Header, w io.Writer, exclude map[string]bool) error

func ListenAndServe

func ListenAndServe(addr string, handler http.Handler) error

func ListenAndServeTLS

func ListenAndServeTLS(addr, certFile, keyFile string, handler http.Handler) error

func MaxBytesReader

func MaxBytesReader(w http.ResponseWriter, r io.ReadCloser, n int64) io.ReadCloser

func NewFileTransport

func NewFileTransport(fs http.FileSystem) http.RoundTripper

func NewRequest

func NewRequest(method, url string, body io.Reader) (*http.Request, error)

func NewRequestWithContext

func NewRequestWithContext(ctx context.Context, method, url string, body io.Reader) (*http.Request, error)

func NewServeMux

func NewServeMux() *http.ServeMux

func NotFoundHandler

func NotFoundHandler() http.Handler

func ParseHTTPVersion

func ParseHTTPVersion(vers string) (int, int, bool)

func ParseTime

func ParseTime(text string) (time.Time, error)

func Post

func Post(url, contentType string, body io.Reader) (*http.Response, error)

func PostForm

func PostForm(url string, data url.Values) (*http.Response, error)

func ProtocolErrorError

func ProtocolErrorError(pe *http.ProtocolError) string

func ProxyFromEnvironment

func ProxyFromEnvironment(req *http.Request) (*url.URL, error)

func ProxyURL

func ProxyURL(fixedURL *url.URL) func(*http.Request) (*url.URL, error)

func ReadRequest

func ReadRequest(b *bufio.Reader) (*http.Request, error)

func ReadResponse

func ReadResponse(r *bufio.Reader, req *http.Request) (*http.Response, error)

func RedirectHandler

func RedirectHandler(url string, code int) http.Handler

func RequestBasicAuth

func RequestBasicAuth(r *http.Request) (string, string, bool)

func RequestClone

func RequestClone(r *http.Request, ctx context.Context) *http.Request

func RequestContext

func RequestContext(r *http.Request) context.Context

func RequestCookie

func RequestCookie(r *http.Request, name string) (*http.Cookie, error)

func RequestCookies

func RequestCookies(r *http.Request) []*http.Cookie

func RequestFormFile

func RequestFormFile(r *http.Request, key string) (multipart.File, *multipart.FileHeader, error)

func RequestFormValue

func RequestFormValue(r *http.Request, key string) string

func RequestMultipartReader

func RequestMultipartReader(r *http.Request) (*multipart.Reader, error)

func RequestParseForm

func RequestParseForm(r *http.Request) error

func RequestParseMultipartForm

func RequestParseMultipartForm(r *http.Request, maxMemory int64) error

func RequestPostFormValue

func RequestPostFormValue(r *http.Request, key string) string

func RequestProtoAtLeast

func RequestProtoAtLeast(r *http.Request, major, minor int) bool

func RequestReferer

func RequestReferer(r *http.Request) string

func RequestUserAgent

func RequestUserAgent(r *http.Request) string

func RequestWithContext

func RequestWithContext(r *http.Request, ctx context.Context) *http.Request

func RequestWrite

func RequestWrite(r *http.Request, w io.Writer) error

func RequestWriteProxy

func RequestWriteProxy(r *http.Request, w io.Writer) error

func ResponseCookies

func ResponseCookies(r *http.Response) []*http.Cookie

func ResponseLocation

func ResponseLocation(r *http.Response) (*url.URL, error)

func ResponseProtoAtLeast

func ResponseProtoAtLeast(r *http.Response, major, minor int) bool

func ResponseWrite

func ResponseWrite(r *http.Response, w io.Writer) error

func Serve

func Serve(l net.Listener, handler http.Handler) error

func ServeMuxHandler

func ServeMuxHandler(mux *http.ServeMux, r *http.Request) (http.Handler, string)

func ServeTLS

func ServeTLS(l net.Listener, handler http.Handler, certFile, keyFile string) error

func ServerClose

func ServerClose(srv *http.Server) error

func ServerListenAndServe

func ServerListenAndServe(srv *http.Server) error

func ServerListenAndServeTLS

func ServerListenAndServeTLS(srv *http.Server, certFile, keyFile string) error

func ServerServe

func ServerServe(srv *http.Server, l net.Listener) error

func ServerServeTLS

func ServerServeTLS(srv *http.Server, l net.Listener, certFile, keyFile string) error

func ServerShutdown

func ServerShutdown(srv *http.Server, ctx context.Context) error

func StatusText

func StatusText(code int) string

func StripPrefix

func StripPrefix(prefix string, h http.Handler) http.Handler

func TimeoutHandler

func TimeoutHandler(h http.Handler, dt time.Duration, msg string) http.Handler

func TransportClone

func TransportClone(t *http.Transport) *http.Transport

func TransportRoundTrip

func TransportRoundTrip(t *http.Transport, req *http.Request) (*http.Response, error)

Types

This section is empty.

Directories

Path Synopsis
This file has automatically been generated on Wed Feb 26 15:50:43 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:43 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:44 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:44 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:44 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:44 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:44 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:44 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:44 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:44 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:44 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:44 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:45 +05 2020.
This file has automatically been generated on Wed Feb 26 15:50:45 +05 2020.

Jump to

Keyboard shortcuts

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