{"modulePath":"github.com/manland/mattermost-server","version":"v5.7.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package httpservice\n\n## Variables\n\n```go\nvar AddressForbidden error = errors.New(\"address forbidden, you may need to set AllowedUntrustedInternalConnections to allow an integration access to your internal network\")\n```\n\n## Functions\n\n```go\nfunc IsReservedIP(ip net.IP) bool\n```\n\n## Types\n\n```go\ntype Client struct {\n\t*http.Client\n}\n```\n\n```go\nfunc NewHTTPClient(enableInsecureConnections bool, allowHost func(host string) bool, allowIP func(ip net.IP) bool) *Client\n```\nNewHTTPClient returns a variation the default implementation of Client. It uses a Transport with the same settings as the default Transport but with the following modifications:\n\n  - shorter timeout for dial and TLS handshake (defined as constant \"connectTimeout\")\n  - timeout for the end-to-end request (defined as constant \"requestTimeout\")\n\n```go\nfunc (c *Client) Do(req *http.Request) (*http.Response, error)\n```\n\n```go\ntype DialContextFunction func(ctx context.Context, network, addr string) (net.Conn, error)\n```\n\n```go\ntype HTTPService interface {\n\tMakeClient(trustURLs bool) *Client\n\tClose()\n}\n```\nWraps the functionality for creating a new http.Client to encapsulate that and allow it to be mocked when testing\n\n```go\nfunc MakeHTTPService(configService configservice.ConfigService) HTTPService\n```\n\n```go\ntype HTTPServiceImpl struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (h *HTTPServiceImpl) Close()\n```\n\n```go\nfunc (h *HTTPServiceImpl) MakeClient(trustURLs bool) *Client\n```\n\n","path":"github.com/manland/mattermost-server/services/httpservice","name":"httpservice","synopsis":"","isRedistributable":true}
