INNER CODE UNIT · Go
WithHTTPClient
movio/bramble · client.go:93
func WithHTTPClient(client *http.Client) ClientOpt {
return func(s *GraphQLClient) {
s.HTTPClient = client
}
}
// WithMaxResponseSize sets the max allowed response size. The client will only
// read up to maxResponseSize and that size is exceeded an an error will be
// returned.
func WithMaxResponseSize(maxResponseSize int64) ClientOpt {
return func(s *GraphQLClient) {
s.MaxResponseSize = maxResponseSize
}
}
func WithTimeout(timeout time.Duration) ClientOpt {
return func(s *GraphQLClient) {
s.HTTPClient.Timeout = timeout