Get HTTP response code.
@return int
770566
public function GetCode () {
		if ($this->code === NULL) {
			$phpCode = http_response_code();
			$this->code = $phpCode === FALSE ? static::OK : $phpCode;
		}
		return $this->code;
	}
415780
private function getAuthCode()
    {
        $amount = intval($this->parameters['amount']);
        if (!$this->sandbox) {
            $url = $this->endpoint . "/Auth/{$this->parameters['custom']}/{$this->parameters['transactionId']}/{$amount}";
            $url_redirect = $this->endpoint_redirect;
        } else {
            $url = $this->sandbox_endpoint . "/Auth/{$this->options['app_key']}/{$this->parameters['transactionId']}/{$amount}";
            $url_redirect = $this->sandbox_endpoint_redirect;
        }
        $response = $this->xml2array($this->curl_request($url));
        $output = explode('|', $response['0']);
        if ($output['0'] != 1) {
            throw new \Exception($output['1']);
        }

        $this->transactionReference = $output['2'];
        $this->auth_code = $output['3'];
        $this->redirect = $url_redirect . '?AuthCode=' . $this->auth_code;
    }
196856
public function getResponse()
    {
        $stream = AssetFacade::stream($this->asset);

        $size = $length = $this->asset->getFilesize();
        $start = 0;
        $end = $size - 1;
        $code = 200;

        if ($range = Request::header('Range')) {
            $c_start = $start;
            $c_end = $end;
            list(, $range) = explode('=', $range, 2);

            if (strpos($range, ',') !== false) {
                abort(416, null, ['Content-Range' => "bytes $start-$end/$size"]);
            }

            if ($range === '-') {
                $c_start = $size - substr($range, 1);
            } else {
                $range = explode('-', $range);
                $c_start = $range[0];
                $c_end = (isset($range[1]) && is_numeric($range[1])) ? $range[1] : $size;
            }

            $c_end = ($c_end > $end) ? $end : $c_end;

            if ($c_start > $c_end || $c_start > $size - 1 || $c_end >= $size) {
                abort(416, null, ['Content-Range' => "bytes $start-$end/$size"]);
            }

            $start = $c_start;
            $end = $c_end;
            $length = $end - $start + 1;
            fseek($stream, $start);
            $code = 206;
        }

        $headers = [
            'Content-Type'        => $this->asset->getMimetype(),
            'Content-Range'       => "bytes $start-$end/$size",
            'Content-Disposition' => "filename='{$this->asset->getOriginalFilename()}'",
            'Content-Length'      => $length,
            'Accept-Ranges'       => 'bytes',
        ];

        return Response::stream(function () use ($stream, $end) {
            $buffer = 1024 * 8;

            while (!feof($stream) && ($p = ftell($stream)) <= $end) {
                if ($p + $buffer > $end) {
                    $buffer = $end - $p + 1;
                }

                set_time_limit(0);
                echo fread($stream, $buffer);
                flush();
            }

            if (is_resource($stream)) {
                fclose($stream);
            }
        }, $code, $headers);
    }
1046289
public function getFormattedResponse()
    {
        list($header, $data) = preg_split("/\r\n\r\n|\n\n|\r\r/", $this->response, 2);

        $headers = preg_split("/\r\n|\n|\r/", $header);
        $status = explode(' ', trim(reset($headers)), 3);

        $result = array(
            'status' => '',
            'http' => $status[0],
            'code' => $status[1]
        );

        if (isset($status[2])) {
            $result['status'] = $status[2];
        }

        return array('data' => $data, 'status' => $result);
    }
758145
public function getResponse()
    {
        $curl = curl_init();

        $this->addParameters()->addHeaders();
        $this->options[CURLOPT_RETURNTRANSFER] = true;
        curl_setopt_array($curl, $this->options);

        $response = curl_exec($curl);

        $this->meta = array(
            'info'             => curl_getinfo($curl, CURLINFO_HTTP_CODE),
            'error_message'    => curl_errno($curl),
            'error_code'    => curl_error($curl));

        curl_close($curl);
        unset($curl);

        return $response;
    }
379480
private function getStatus()
    {
        if (!($statusArray = preg_grep('/^HTTP\/(1.0|1.1)\s+(\d+)\s+(.+)/', $this->headers))) {
            throw new \RuntimeException('Could not determine HTTP status from API response');
        }

        if (!preg_match('/^HTTP\/(1.0|1.1)\s+(\d+)\s+(.+)/', $statusArray[0], $matchesArray)) {
            throw new \RuntimeException('Could not determine HTTP status from API response');
        }

        return array(
            'code' => $matchesArray[2],
            'message' => $matchesArray[3],
        );
    }
833590
public function getResponseData(): Response
    {
        $connectionResponse = new ConnectionResponseImpl();
        $errorResponse = $this->streamSocket->read();
        if ($errorResponse !== null) {
            $this->getLogger()->error('Send error: ' . $errorResponse);
            $this->streamSocket->disconnect();
            $response = @unpack('Ccommand/Cstatus/Nidentifier', $errorResponse);
            if (!empty($response)) {
                $connectionResponse->setErrorResponse($response);
            } else {
                $connectionResponse->setErrorResponse(null);
            }
        }

        return $connectionResponse;
    }
903940
public function getVersion()
    {
        if ($this->version === null) {
            $response = $this->httpClient->request('GET', '/');
            if ($response->status != 200) {
                throw HTTPException::fromResponse('/', $response);
            }

            $this->version = $response->body['version'];
        }

        return $this->version;
    }
764191
public function get_response_code()
    {
        switch ($this->conn->resultcode) {
            case 'NOPERM':
                return self::NOPERM;
            case 'READ-ONLY':
                return self::READONLY;
            case 'TRYCREATE':
                return self::TRYCREATE;
            case 'INUSE':
                return self::INUSE;
            case 'OVERQUOTA':
                return self::OVERQUOTA;
            case 'ALREADYEXISTS':
                return self::ALREADYEXISTS;
            case 'NONEXISTENT':
                return self::NONEXISTENT;
            case 'CONTACTADMIN':
                return self::CONTACTADMIN;
            default:
                return self::UNKNOWN;
        }
    }
428369
protected function GetResponseURL()
    {
        $sReturnURLBase = $this->getActivePageService()->getActivePage()->GetRealURLPlain(array(), true);
        if ('.html' === substr($sReturnURLBase, -5)) {
            $sReturnURLBase = substr($sReturnURLBase, 0, -5);
        }
        if ('/' !== substr($sReturnURLBase, -1)) {
            $sReturnURLBase .= '/';
        }

        return $sReturnURLBase;
    }
1068698
protected function GetErrorCodesFromResponse()
    {
        $SReturnMessage = false;
        if ($this->bIsCorrectIPaymentType()) {
            $oGlobal = TGlobal::instance();
            $SReturnState = $oGlobal->GetUserData('ret_status');
            if ('ERROR' == $SReturnState) {
                $SReturnMessage = $oGlobal->GetUserData('ret_errormsg');
                $SReturnMessage = utf8_encode($SReturnMessage);
            }
        }

        return $SReturnMessage;
    }
447769
public function toString()
    {
        $response = Parser\ResponseParser::buildStatusLine($this) . Http::NEW_LINE;
        $headers  = Parser\ResponseParser::buildHeaderFromMessage($this);

        foreach ($headers as $header) {
            $response.= $header . Http::NEW_LINE;
        }

        $response.= Http::NEW_LINE;
        $response.= (string) $this->getBody();

        return $response;
    }
1297496
public function getHttpVersion() {
		if (!isset($this->httpVersion)) {
			$serverProtocol = $_SERVER['SERVER_PROTOCOL'];
			$this->httpVersion = substr($serverProtocol, strpos($serverProtocol, '/') + 1);
		}
		return $this->httpVersion;
	}
1194476
protected function getResponse()
    {
        if ($this->response === null) {
            $this->response = $this->client->send($this->request);
        }

        return $this->response;
    }
1338950
public function httpResponse()
    {
        if ($this->httpResponse === null) {
            throw new RuntimeException(sprintf(
                'PSR-7 HTTP Response is not defined for "%s"',
                get_class($this)
            ));
        }

        return $this->httpResponse;
    }
652695
public function getCode()
    {
        $result = $this->code;
        if (is_callable($result)) {
            $result = $result($this);
        }

        return (string) $result;
    }
518267
public function getHttpCode()
    {
        $code= 200;
        if ($this->errors) {
            /**
             * @var \FreeFW\JsonApi\V1\Model\ErrorObject $oneError
             */
            foreach ($this->errors as $idx => $oneError) {
                if ($oneError->getStatus() > $code) {
                    $code = $oneError->getStatus();
                }
            }
        }
        return $code;
    }