Closed Dysar closed 4 years ago
Hello @Dysar indeed I should allow to set a "custom" http client.
Something like:
type Client struct {
Hostname string
HttpClient *http.Client
}
Yeeeah, that would be a good solution!
I did like it in the PHP client: https://github.com/thecodingmachine/gotenberg-php-client/blob/master/src/Client.php#L27
Dunno why I forgot to do it in the Go clien too 😄
Expected Behavior
When I execute Client's Post() method I want to be sure that it will not hang forever.
Current Behavior
Currently there is no limit
Possible Solution
Using http client as described in this article solves this issue https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779