* @return
* @throws TTransportException
*/
<T> T createStoreClient(Class<T> clientClass, String url, String token)
throws TTransportException {
THttpClient transport = new THttpClient(url);
transport.setCustomHeader(USER_AGENT_KEY, generateUserAgent());
if (customHeaders != null) {
for (Map.Entry<String, String> header : customHeaders.entrySet()) {
transport.setCustomHeader(header.getKey(), header.getValue());
}
}
TProtocol protocol = new TBinaryProtocol(transport);
try {