断开apiclient，一般不需要调用
554480
public void release() {
        HMSAgentLog.d("release");

        isResolving = false;
        resolveActivity = null;
        hasOverActivity = false;

        HuaweiApiClient client =  getApiClient();
        if (client != null) {
            client.disconnect();
        }

        synchronized (APICLIENT_LOCK) {
            apiClient = null;
        }

        synchronized (STATIC_CALLBACK_LOCK) {
            staticCallbacks.clear();
        }

        synchronized (CALLBACK_LOCK) {
            connCallbacks.clear();
        }
    }
187940
public String getStatus() throws ExecutionException, InterruptedException, IOException {
    return (new FutureAPIResponse(client.prepareGet(apiUrl).execute(getHandler()))).get()
        .getMessage();
  }
324445
public static synchronized SailthruClient getInstance(String apiKey, String apiSecret, String apiUrl) {
        if (_instance == null) {
            _instance = new SailthruClient(apiKey, apiSecret, apiUrl);
        }
        return _instance;
    }
912954
function getApiItem(apiName){

  var apiItem, apiPath, method
    , group = apiName.split('.')
    , name = group[1]
    ;

  group = group[0];
  
  try{
    apiItem = name ? api[group][name] : api[group]
  }catch(e){
    return false;
  }
  
  if(apiItem == undefined){
    return false;
  }else if(typeof apiItem == 'string'){
    apiPath = apiItem;
    apiItem = {
        path: apiPath
    };
  }else if(typeof apiItem == 'object'){
  
    if(apiItem.path){
      apiPath = apiItem.path;
    }else{
    //直接使用分组名
      apiItem = apiItem[Object.keys(apiItem)[0]];
      apiPath = apiItem;
      
    }
    method = apiItem.method || 'get';
  }else{
    throw new Error('wtf.');
  }
  
  return {
      method: method
    , path: apiPath
    , expect: apiItem.expect
    , promise: apiItem.promise || group
  }
  
}
341076
public T execute() throws ApiException, IOException {
        return client.executeRequest(this.builder, expectedCode, responseClass, needAuth);
    }
688416
public T get() throws Exception {
    waitForPromiseSuccess();

    if (response != null) {
      return response;
    } else {
      if (this.exception instanceof IOException) {
        throw (IOException) this.exception;
      } else if (this.exception instanceof io.netty.handler.timeout.TimeoutException) {
        throw new TimeoutException();
      } else {
        throw new IOException(this.exception);
      }
    }
  }
981577
public function reset(): ApiClient
    {
        $this->internalRequest = new InternalRequest($this->baseUrl, 'GET');
        $this->request = null;
	$this->response = null;

        $this->profiler = false;

        $this->hasPerformedRequest = false;
        $this->kernel->shutdown();
        $this->kernel->boot();

        return $this;
    }
40869
@Override
  public void execute() throws Exception {
    ApiClient apiClient = new ApiClient(ApiClient.getToken(), false);
    int rateRemain = apiClient.getRateLimitRemain();
    System.out.println("Your Github API token is valid.");
    System.out.println(rateRemain+ " requests remaining.");
  }
1129980
public InputStream getInputStream() throws APIException, IOException {
        final HttpResponse response = client.get(getUrl());
        HttpClientHelpers.throwIfNotOk(response);
        return response.getEntity().getContent();
    }
1349993
def api_call(self, method, **params):
        
        coro = self._api_call(method, **params)
        # Explicitly ensure that API call is executed
        return asyncio.ensure_future(coro)
684337
private ObjectNode makeRequest(final String api) {
        ObjectNode req = JSON.objectNode();
        req.put("api", api);
        return req;
    }
301459
function callApi (method) {
  return function (req, res) {
    var apiAction = api[method](req.guid, req.options)
    handleResponse(apiAction, res)
  }
}
222260
public <T> ApiResponse<T> execute(Call call) throws ApiException {
        return execute(call, null);
    }
269556
private HttpResponse execute(HttpClient client, HttpUriRequest request) throws IOException {
        if (localContext != null) {
            return client.execute(request, localContext);
        } else {
            return client.execute(request);
        }
    }
592820
function TransmitOralProcessWithInit(client, req) {
    return new Promise(function (resolve, reject) {
        // 通过client对象调用想要访问的接口，需要传入请求对象以及响应回调函数
        client.TransmitOralProcessWithInit(req, function (err, response) {
            if (err) {
                reject(err)
                return;
            }
            // 请求正常返回，打印response对象
            resolve(response)
        });
    })
}
1087231
static String decode(InputStream in) throws ApiDataException, ApiConnectionException {
        StringBuilder res = new StringBuilder();
        decode(in, res);
        return res.toString();
    }
510186
@Override
	public Result<Void> getAPIExample(AuthzTrans trans, HttpServletResponse resp, String nameOrContentType, boolean optional) {
		TimeTaken tt = trans.start(API_EXAMPLE, Env.SUB);
		try {
			String content =Examples.print(apiDF.getEnv(), nameOrContentType, optional); 
			resp.getOutputStream().print(content);
			setContentType(resp,content.contains("<?xml")?TYPE.XML:TYPE.JSON);
			return Result.ok();
		} catch (Exception e) {
			trans.error().log(e,IN,API_EXAMPLE);
			return Result.err(Result.ERR_NotImplemented,e.getMessage());
		} finally {
			tt.done();
		}
	}