From 51f4acc3306ecc555fa8a65c03421b92b3e6ae2c Mon Sep 17 00:00:00 2001 From: Joshua Humphries <2035234+jhump@users.noreply.github.com> Date: Fri, 23 Jun 2023 15:38:08 -0400 Subject: [PATCH] Export max URL size option (#529) --- client_get_fallback_test.go | 2 +- option.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client_get_fallback_test.go b/client_get_fallback_test.go index 60eb6bcd..ba8fe0fe 100644 --- a/client_get_fallback_test.go +++ b/client_get_fallback_test.go @@ -47,7 +47,7 @@ func TestClientUnaryGetFallback(t *testing.T) { server.Client(), server.URL+"/connect.ping.v1.PingService/Ping", WithHTTPGet(), - withHTTPGetMaxURLSize(1, true), + WithHTTPGetMaxURLSize(1, true), WithSendGzip(), ) ctx := context.Background() diff --git a/option.go b/option.go index fb70ef58..b7d73e25 100644 --- a/option.go +++ b/option.go @@ -456,7 +456,7 @@ func (o *enableGet) applyToClient(config *clientConfig) { config.EnableGet = true } -// withHTTPGetMaxURLSize sets the maximum allowable URL length for GET requests +// WithHTTPGetMaxURLSize sets the maximum allowable URL length for GET requests // made using the Connect protocol. It has no effect on gRPC or gRPC-Web // clients, since those protocols are POST-only. // @@ -474,7 +474,7 @@ func (o *enableGet) applyToClient(config *clientConfig) { // // By default, Connect-protocol clients with GET requests enabled may send a // URL of any size. -func withHTTPGetMaxURLSize(bytes int, fallback bool) ClientOption { +func WithHTTPGetMaxURLSize(bytes int, fallback bool) ClientOption { return &getURLMaxBytes{Max: bytes, Fallback: fallback} }