Documentation ¶
Overview ¶
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.
Index ¶
- Constants
- func CloneMultipartFileHeader(fh *multipart.FileHeader) *multipart.FileHeader
- func CloneMultipartForm(f *multipart.Form) *multipart.Form
- func CloneOrMakeHeader(hdr http.Header) http.Header
- func CloneURL(u *url.URL) *url.URL
- func CloneURLValues(v url.Values) url.Values
- func ErrorFromHttp(code int) error
- func ExtractFromContext(ctx context.Context, key string) string
- func ExtractFromHTTP(r *http.Request, key string) string
- func ExtractHTTPAndContext(r *http.Request, key string) string
- func ExtractRequestIDFromContext(ctx context.Context) string
- func ExtractRequestIdHTTPAndContext(r *http.Request) string
- func GetIPFromRequest(r *http.Request) (net.IP, error)
- func RequestWithProxyTarget(req *http.Request, target string) error
- func SetPairContext(r *http.Request, key, value string) *http.Request
- func SetRequestIdContext(r *http.Request, requestID string) *http.Request
- type Client
- func (o *Client) ApplyOptions(options ...ClientOption) *Client
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) Get(url string) ([]byte, error)
- func (c *Client) HttpDo(method string, url string, contentType string, headers map[string]string, ...) (*http.Response, error)
- func (c *Client) HttpReader(method, url, contentType string, headers map[string]string, ...) ([]byte, error)
- func (c *Client) Post(url, contentType string, headers map[string]string, body []byte) ([]byte, error)
- func (c *Client) PostJson(url string, headers map[string]string, body []byte) ([]byte, error)
- func (c *Client) PostJsonWithAuthorize(url string, headers map[string]string, auth func(r *http.Request) error, ...) ([]byte, error)
- func (c *Client) PostPb(url string, headers map[string]string, body []byte) ([]byte, error)
- func (c *Client) PostReader(url, contentType string, headers map[string]string, ...) ([]byte, error)
- func (c *Client) Put(url, contentType string, headers map[string]string, body []byte) ([]byte, error)
- func (c *Client) PutReader(url, contentType string, headers map[string]string, ...) ([]byte, error)
- type ClientOption
- func WithDisableKeepAlives(disableKeepAlives bool) ClientOption
- func WithIdleConnTimeout(idleConnTimeout time.Duration) ClientOption
- func WithLogger(l *log.Logger) ClientOption
- func WithMaxIdleConns(maxIdleConns int) ClientOption
- func WithProxy(proxyURL string) ClientOption
- func WithProxyTarget(target string) ClientOption
- func WithResonseHeaderTimeout(responseHeaderTimeout time.Duration) ClientOption
- func WithTimeout(timeout time.Duration) ClientOption
- type ClientOptionFunc
- type EmptyClientOption
- type EmptyHandlerChainOption
- type EmptyHandlerInterceptorOption
- type HandlerChain
- type HandlerChainOption
- type HandlerChainOptionFunc
- type HandlerInterceptor
- type HandlerInterceptorOption
- type HandlerInterceptorOptionFunc
- type ResponseWriterWrapper
Constants ¶
const (
DefaultHTTPRequestIDKey = "X-Request-ID"
)
RequestIdKey is metadata key name for request ID
Variables ¶
This section is empty.
Functions ¶
func CloneMultipartFileHeader ¶ added in v0.0.61
func CloneMultipartFileHeader(fh *multipart.FileHeader) *multipart.FileHeader
func CloneMultipartForm ¶ added in v0.0.61
func CloneOrMakeHeader ¶ added in v0.0.61
CloneOrMakeHeader invokes Header.Clone but if the result is nil, it'll instead make and return a non-nil Header.
func ErrorFromHttp ¶ added in v0.0.93
func ExtractFromContext ¶ added in v0.0.95
func ExtractHTTPAndContext ¶ added in v0.0.95
func ExtractRequestIDFromContext ¶ added in v0.0.95
func ExtractRequestIdHTTPAndContext ¶ added in v0.0.95
func GetIPFromRequest ¶ added in v0.0.29
returns IP address from request. It will lookup IP in X-Forwarded-For and X-Real-IP headers.
func RequestWithProxyTarget ¶ added in v0.0.93
func SetPairContext ¶ added in v0.0.95
Types ¶
type Client ¶
func NewClient ¶
func NewClient(options ...ClientOption) (*Client, error)
func NewClientWithProxyTarget ¶ added in v0.0.95
func NewClientWithProxyTarget(target string, opts ...ClientOption) *Client
func (*Client) ApplyOptions ¶
func (o *Client) ApplyOptions(options ...ClientOption) *Client
func (*Client) HttpReader ¶ added in v0.0.103
func (*Client) PostJsonWithAuthorize ¶ added in v0.0.14
func (*Client) PostReader ¶
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
A ClientOption sets options.
func WithDisableKeepAlives ¶
func WithDisableKeepAlives(disableKeepAlives bool) ClientOption
func WithIdleConnTimeout ¶
func WithIdleConnTimeout(idleConnTimeout time.Duration) ClientOption
func WithMaxIdleConns ¶
func WithMaxIdleConns(maxIdleConns int) ClientOption
func WithProxy ¶ added in v0.0.95
func WithProxy(proxyURL string) ClientOption
func WithProxyTarget ¶ added in v0.0.93
func WithProxyTarget(target string) ClientOption
dns:///ai-media-1256936300.cos.ap-guangzhou.myqcloud.com
func WithResonseHeaderTimeout ¶
func WithResonseHeaderTimeout(responseHeaderTimeout time.Duration) ClientOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
type ClientOptionFunc ¶
type ClientOptionFunc func(*Client)
ClientOptionFunc wraps a function that modifies Client into an implementation of the ClientOption interface.
type EmptyClientOption ¶
type EmptyClientOption struct{}
EmptyClientOption does not alter the configuration. It can be embedded in another structure to build custom options.
This API is EXPERIMENTAL.
type EmptyHandlerChainOption ¶ added in v0.0.74
type EmptyHandlerChainOption struct{}
EmptyHandlerChainOption does not alter the configuration. It can be embedded in another structure to build custom options.
This API is EXPERIMENTAL.
type EmptyHandlerInterceptorOption ¶ added in v0.0.74
type EmptyHandlerInterceptorOption struct{}
EmptyHandlerInterceptorOption does not alter the configuration. It can be embedded in another structure to build custom options.
This API is EXPERIMENTAL.
type HandlerChain ¶ added in v0.0.74
type HandlerChain struct { //invoke before http handler PreHandlers []func(w http.ResponseWriter, r *http.Request) error Handlers []HandlerInterceptor //invoke after http handler PostHandlers []func(w http.ResponseWriter, r *http.Request) }
func NewHandlerChain ¶ added in v0.0.74
func NewHandlerChain(opts ...HandlerChainOption) *HandlerChain
func (*HandlerChain) ApplyOptions ¶ added in v0.0.74
func (o *HandlerChain) ApplyOptions(options ...HandlerChainOption) *HandlerChain
type HandlerChainOption ¶ added in v0.0.74
type HandlerChainOption interface {
// contains filtered or unexported methods
}
A HandlerChainOption sets options.
type HandlerChainOptionFunc ¶ added in v0.0.74
type HandlerChainOptionFunc func(*HandlerChain)
HandlerChainOptionFunc wraps a function that modifies HandlerChain into an implementation of the HandlerChainOption interface.
type HandlerInterceptor ¶ added in v0.0.74
func NewHandlerInterceptor ¶ added in v0.0.74
func NewHandlerInterceptor(opts ...HandlerInterceptorOption) *HandlerInterceptor
func (*HandlerInterceptor) ApplyOptions ¶ added in v0.0.74
func (o *HandlerInterceptor) ApplyOptions(options ...HandlerInterceptorOption) *HandlerInterceptor
type HandlerInterceptorOption ¶ added in v0.0.74
type HandlerInterceptorOption interface {
// contains filtered or unexported methods
}
A HandlerInterceptorOption sets options.
type HandlerInterceptorOptionFunc ¶ added in v0.0.74
type HandlerInterceptorOptionFunc func(*HandlerInterceptor)
HandlerInterceptorOptionFunc wraps a function that modifies HandlerInterceptor into an implementation of the HandlerInterceptorOption interface.
type ResponseWriterWrapper ¶ added in v0.0.74
type ResponseWriterWrapper struct {
// contains filtered or unexported fields
}
ResponseWriterWrapper
func NewResponseWriterWrapper ¶ added in v0.0.74
func NewResponseWriterWrapper(w http.ResponseWriter) *ResponseWriterWrapper
func (*ResponseWriterWrapper) Header ¶ added in v0.0.74
func (rww *ResponseWriterWrapper) Header() http.Header
Header function overwrites the http.ResponseWriter Header() function
func (*ResponseWriterWrapper) String ¶ added in v0.0.74
func (rww *ResponseWriterWrapper) String() string
String function pack respose header, http status code and body
func (*ResponseWriterWrapper) Write ¶ added in v0.0.74
func (rww *ResponseWriterWrapper) Write(buf []byte) (int, error)
func (*ResponseWriterWrapper) WriteHeader ¶ added in v0.0.74
func (rww *ResponseWriterWrapper) WriteHeader(statusCode int)
WriteHeader function overwrites the http.ResponseWriter WriteHeader() function