# README
cfhttp
Wrapper for official go http package
[!NOTE]
This repository should be imported as
code.cloudfoundry.org/cfhttp/v2
.
Contributing
See the Contributing.md for more information on how to contribute.
Working Group Charter
This repository is maintained by App Runtime
Platform
under Diego
area.
[!IMPORTANT]
Content in this file is managed by the CI task
sync-readme
and is generated by CI following a convention.
# Packages
No description provided by the author
# Functions
NewClient builds a HTTP client with suitable defaults.
WithDialTimeout sets the time limit for connecting to the remote address.
WithDisableKeepAlives disables keep-alive on every HTTP connection so that every connection is closed as soon as its request is done.
WithIdleConnTimeout sets the maximum amount of time a keep-alive connection can be idle before it closes itself.
WithMaxIdleConnsPerHost sets the maximum number of keep-alive connections that can be active at a time per remote host.
WithRequestTimeout sets the total time limit for requests made by this Client.
WithStreamingDefaults modifies the HTTP client with defaults that are more suitable for consuming server-sent events on persistent connections.
WithTCPKeepAliveTimeout sets the keep-alive period for an active TCP connection.
WithTLSConfig sets the TLS configuration on the HTTP client.
# Type aliases
Option can be used to configure different parts of the HTTP client, including its internal transport or the connection dialer.