[ 
https://issues.apache.org/jira/browse/THRIFT-5849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17923842#comment-17923842
 ] 

Cameron Martin edited comment on THRIFT-5849 at 2/4/25 9:56 PM:
----------------------------------------------------------------

I think it's beneficial to everyone using it. I can see why the browser version 
would have to omit some things, where the browser does not provide the 
necessary APIs, but other things being missing is surprising to me, especially 
when it is an alias to an existing exported function.

My exact use-case is for creating a custom Connection type, where even though 
createClient is just an alias to existing exported functions, the generic name 
makes a lot more sense to use.

Out of interest, do you know why this gets re-exported as createWsClient, 
createHttpClient, etc? Is this historical, where the implementations used to 
differ?


was (Author: JIRAUSER306515):
I think it's beneficial to everyone using it. I can see why the browser version 
would have to omit some things, where the browser does not provide the 
necessary APIs, but other things being missing is surprising to me, especially 
when it is an alias to an existing exported function.

My exact use-case is for creating a custom Connection type, where even though 
createClient is just an alias to existing exported functions, the name makes a 
lot more sense to use.

Out of interest, do you know why this gets re-exported as createWsClient, 
createHttpClient, etc? Is this historical, where the implementations used to 
differ?

> Expose createClient in browser version of nodejs package
> --------------------------------------------------------
>
>                 Key: THRIFT-5849
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5849
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Node.js - Library
>            Reporter: Cameron Martin
>            Priority: Major
>
> {{createClient}} is exposed in a nodejs context, but not for browsers. Even 
> though this is the same function as {{{}createWsClient{}}}, 
> {{{}createHttpClient{}}}, etc, it seems odd to use these for custom 
> connection types. Moreover, it is beneficial for the browser and nodejs 
> interface to be as similar as possible. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to