You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Can Celasun (JIRA)" <ji...@apache.org> on 2019/01/03 14:42:00 UTC
[jira] [Closed] (THRIFT-4320) Use interface instead of strict
http.Client type in THttpClientOptions
[ https://issues.apache.org/jira/browse/THRIFT-4320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Can Celasun closed THRIFT-4320.
-------------------------------
Resolution: Information Provided
Closing, as the HTTP client is already fully customizable. See my previous comment.
> Use interface instead of strict http.Client type in THttpClientOptions
> ----------------------------------------------------------------------
>
> Key: THRIFT-4320
> URL: https://issues.apache.org/jira/browse/THRIFT-4320
> Project: Thrift
> Issue Type: Improvement
> Components: Go - Library
> Reporter: Marek Brysa
> Priority: Minor
>
> {{THttpClientOptions}} (http_client.go) takes a strict {{http.Client}} type which disallows developers from customizing http.Client or providing their own implementation. I propose to replace this with an interface such as:
> {code}
> type HttpClient interface {
> Do(req *http.Request) (*http.Response, error)
> }
> {code}
> {{Do()}} is the only function of http.Client that is used (in {{THttpClient.Flush()}}).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)