Skip to content

Commit

Permalink
Export max URL size option (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhump authored Jun 23, 2023
1 parent f9f08a8 commit 51f4acc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client_get_fallback_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions option.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand All @@ -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}
}

Expand Down

0 comments on commit 51f4acc

Please sign in to comment.