protected function _callApiNoCurl(
    $httpmethod, $method, $method_template, $params = [], $multipart = false, $app_only_auth = false
  )
  {
    list ($authorization, $url, $params, $request_headers)
      = $this->_callApiPreparations(
        $httpmethod, $method, $method_template, $params, $multipart, $app_only_auth
      );

    $hostname = parse_url($url, PHP_URL_HOST);
    if ($hostname === false) {
      throw new CodebirdEndpointException('Incorrect API endpoint host.');
    }

    $request_headers[] = 'Authorization: ' . $authorization;
    $request_headers[] = 'Accept: */*';
    $request_headers[] = 'Connection: Close';
    if ($httpmethod !== 'GET' && ! $multipart) {
      $request_headers[]  = 'Content-Type: application/x-www-form-urlencoded';
    }

    $contextOptions = [
      'http' => [
        'method'           => $httpmethod,
        'protocol_version' => '1.1',
        'header'           => implode("\r\n", $request_headers),
        'timeout'          => $this->_timeouts['request'] / 1000,
        'content'          => in_array($httpmethod, ['POST', 'PUT']) ? $params : null,
        'ignore_errors'    => true
      ]
    ];

    list($reply, $headers) = $this->_getNoCurlInitialization($url, $contextOptions, $hostname);
    $result  = '';
    foreach ($headers as $header) {
      $result .= $header . "\r\n";
    }
    $result .= "\r\n" . $reply;

    // find HTTP status
    $httpstatus            = $this->_getHttpStatusFromHeaders($headers);
    list($headers, $reply) = $this->_parseApiHeaders($result);
    // TON API & redirects
    $reply                 = $this->_parseApiReplyPrefillHeaders($headers, $reply);
    $reply                 = $this->_parseApiReply($reply);
    $rate                  = $this->_getRateLimitInfo($headers);

    $reply = $this->_appendHttpStatusAndRate($reply, $httpstatus, $rate);
    return $reply;
  }