perf(cmpp): reserve transport for inbound submit
This commit is contained in:
@@ -15,7 +15,10 @@ import (
|
||||
const maxAPIResponseBodyBytes int64 = 4 * 1024 * 1024
|
||||
|
||||
func (s Server) post(ctx context.Context, path string, payload any, result any) error {
|
||||
client := s.HTTPClient
|
||||
return s.postWithClient(ctx, s.HTTPClient, path, payload, result)
|
||||
}
|
||||
|
||||
func (s Server) postWithClient(ctx context.Context, client *http.Client, path string, payload any, result any) error {
|
||||
if client == nil {
|
||||
client = &http.Client{Timeout: defaultHTTPTimeout}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user