Send request data method
@return string request execution result
@throws TransportException in case of undefined Transport
498117
public function send() {
        if (is_null($this->Transport)) {
            throw new TransportException();
        }
        $this->Transport->setRequest($this);
        return $this->Transport->makeHttpRequest($this);
    }
800827
public function sendRequest()
    {
        try {
            if (mb_strlen($this->url) >= 9) {
                $response       = $this->useFileGetContents();
                $this->response = $response;

                return $response;
            }
        }
        catch (Exception $e) {
            $message = "Error: " . __CLASS__ . ": Please make sure to set a URL to fetch - Line: " . $e->getLine() . ' - Msg: ' . $e->getMessage();
            $this->debug->error(__FUNCTION__, $message);

            return $message;
        }

        return NULL;
    }
692888
public function send()
    {
        $data = $this->getData();
        $reflect = new ReflectionClass($this);

        $this->trigger('before' . $reflect->getShortName(), new Event($this));
        
        $response = $this->sendData($data);

        $this->trigger('after' . $reflect->getShortName(), new Event($this));

        return $response;
    }
1124565
public static function Send(){
            $oThis = self::CreateInstanceIfNotExists();
            
            if(is_object($oThis->oSmarty)){
                $oThis->CreateCacheCSS();
                $oThis->CreateCacheJS();
                
                Storage::AssignSmarty($oThis->oSmarty);
                Events::Call("BeforeSendingOutput");
                
                $oThis->oSmarty->display($oThis->sTemplateFilename);
            }
            else{
                $oThis = self::CreateInstanceIfNotExists();
                $oThis->CreateCacheCSS();
                $oThis->CreateCacheJS();
                $oThis->IncludeTemplate();
                $oThis->ReplaceVars();
                $oThis->RemoveUndefinedVars();
                $oThis->CheckConditions();
                //$oThis->ClearList();
                Events::Call("BeforeSendingOutput");

                @header('HTTP/1.1 200 OK');
                @header("Content-Type: text/html; charset=" . strtoupper(Storage::Get("app.charset", "UTF-8")), true);

                try{
                    //var_dump($oThis->sBuffer); die();
                    eval('?> ' . $oThis->sBuffer);
                    die();
                }
                catch(Exception $e){
                    die($e->getMessage());
                }
            }
        }
129451
protected function getRequestData()
    {
        if ($this->PWE->getHeader('content-type') != 'application/json') {
            throw new HTTP4xxException("API requires 'application/json' as type for request body", HTTP4xxException::UNSUPPORTED_MEDIA_TYPE);
        }

        return json_decode(file_get_contents("php://input"), true);
    }
773638
public function getRequestData()
    {
        parent::getRequestData();

        if ($this->getRequest() instanceof Request) {
            if (in_array($this->getRequest()->getMethod(), array('PUT', 'DELETE'))) {
                $this->requestData[$this->getRequest()->getMethod()] = $this->getRequest()->request->all();
            }
        }

        return $this->requestData;
    }
12709
public function send()
    {
        $allowed_status_codes = array_merge(array(200), $this->ignoredStatusCodes);
        $this->ignoredStatusCodes = array();

        try {
            $this->_setupCurl();
            $response = curl_exec($this->curl);

            if (!in_array(curl_getinfo($this->curl, CURLINFO_HTTP_CODE), $allowed_status_codes)) {
                if (curl_errno($this->curl)) {
                    throw new \RuntimeException('The HTTP request failed: ' . curl_error($this->curl));
                }
                throw new \RuntimeException('The HTTP request failed: unknown error.');
            }
            curl_close($this->curl);

            return $this->hasToDecodeResponse ? json_decode($response) : $response;
        } catch (Exception $e) {  }
    }
684445
protected function receive()
    {
        try {
            $data = $this->client->recv();

            if ($data === false) {
                $errorCode = $this->client->errCode;

                if ($errorCode == 11) {
                    throw new TransportException('Receive timeout in '.$this->getTimeout().' ms.',
                        TransportException::TIMEOUT);
                }

                throw new TransportException('Receive data failed, cause: '.socket_strerror($errorCode).'.',
                    TransportException::CONNECTION);
            } elseif ($data === '') {
                throw new TransportException('Receive data failed, cause the connection has been closed.',
                    TransportException::CONNECTION);
            }
        } catch (TransportException $e) {
            throw $e;
        } catch (Throwable $e) {
            if ($this->causedByTimeout($e)) {
                throw new TransportException('Receive timeout in '.$this->getTimeout().' ms.',
                    TransportException::TIMEOUT, $e);
            }

            throw new TransportException($e->getMessage(), 0, $e);
        }

        return $data;
    }
305333
public function send()
	{
		$mappedParams = $this->map();

		$curler = new \GuzzleHttp\Client(['base_uri' => $this->tgUrl]);

		if (empty($this->multipart)) {
			$response = $curler->request("POST", static::$method, [
				"query" => $mappedParams
			]);
		} else {
			$response = $curler->request("POST", static::$method, [
				"query" => $mappedParams,
				"multipart" => $this->multipart
			]);
		}

		$jsonResponse = json_decode((string)$response->getBody(), true);
		$result = $jsonResponse['result'];
		return static::decodeResult($result);
	}
1203270
private function send_request() {
        // check if stream is declared to be open
        // only logical check we are not sure if socket is really still open ...
        if ($this->_connection_closed) {
            // reopen it
            // be sure to close the open socket.
            $this->close();
            $this->reopen();
        }

        // convert array to string
        $buffer = implode("\r\n", $this->_req);
        $buffer .= "\r\n\r\n";
        $this->_error_log($buffer);
        fputs($this->sock, $buffer);
    }
1043151
protected function receiveHttpData()
    {
        $presenter = $this->getPresenter();
        if (!$presenter->isSignalReceiver($this, 'submit')) {
            return;
        }

        $isPost = $this->getMethod() === self::POST;
        $request = $presenter->getRequest();
        if ($request->isMethod('forward') || $request->isMethod('post') !== $isPost) {
            return;
        }

        if ($isPost) {
            return Nette\Utils\Arrays::mergeTree($request->getPost(), $request->getFiles());
        } else {
            return $request->getParameters();
        }
    }
245271
public function send()
    {
        //@TODO when returning the location header during
        //test it fetches the new location even though the
        //code is not redirect
        $this->getResponse()->setContentType('application/json');
        $headers = $this->getResponse()->getHeaders();

        if (isset($headers['Location'])) {
            $headers['Content-Location'] = $headers['Location'];
            unset($headers['Location']);
        }

        //If not padding is set inspect the request query.
        if (empty($this->_padding)) {
            $request = $this->getResponse()->getRequest();
            if ($request->has('callback')) {
                $this->setCallback($request->get('callback'));
            }
        }

        return parent::send();
    }
877996
public function Send () {
		if ($this->IsSent()) return;
		$httpVersion = $this->GetHttpVersion();
		$code = $this->GetCode();
		$status = $this->codeMessage !== NULL
			? ' '.$this->codeMessage
			: (isset(static::$codeMessages[$code]) 
				? ' '.static::$codeMessages[$code] 
				: '');
		if (!isset($this->headers['Content-Encoding'])) {
			if (!$this->encoding) $this->encoding = 'utf-8';
			$this->headers['Content-Encoding'] = $this->encoding;
		}
		$this->UpdateHeaders();
		header($httpVersion . ' ' . $code . $status);
		header('Host: ' . $this->request->GetHost());
		foreach ($this->headers as $name => $value) {
			if ($name == 'Content-Type') {
				$charsetMatched = FALSE;
				$charsetPos = strpos($value, 'charset');
				if ($charsetPos !== FALSE) {
					$equalPos = strpos($value, '=', $charsetPos);
					if ($equalPos !== FALSE) $charsetMatched = TRUE;
				}
				if (!$charsetMatched) $value .= ';charset=' . $this->encoding;
			}
			if (isset($this->disabledHeaders[$name])) {
				header_remove($name);
			} else {
				header($name . ": " . $value);
			}
		}
		foreach ($this->disabledHeaders as $name => $b)
			header_remove($name);
		$this->addTimeAndMemoryHeader();
		echo $this->body;
		if (ob_get_level()) echo ob_get_clean();
		flush();
		$this->sent = TRUE;
	}
780452
public function send()
  {
    // Set headers
    $this->setContentType('application/json');

    /** @var PhrestRequest $request */
    $request = $this->getDI()->get('request');

    // Set content
    if (!$request->isHead())
    {
      if (empty($this->messages))
      {
        $this->messages = null;
      }
      if (empty($this->data))
      {
        $this->data = null;
      }

      if ($request->isPretty())
      {
        $this->setContent(json_encode($this, JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK));
      }
      else
      {
        $this->setContent(json_encode($this, JSON_NUMERIC_CHECK));
      }
    }

    // Send content
    return parent::send();
  }
532611
protected function doRequest($data)
    {
        $this->send(self::MAGIC_HEADER.pack('N', strlen($data)));
        $this->send($data);

        $data = $this->receive();

        $this->checkReceivedDataMagic($data);

        $status = unpack('Nstatus', substr($data, 4, 4))['status'];
        $data = substr($data, 12);

        if ($status != 200) {
            throw new TransportException($data ?: 'Http request failed, status: '.$status,
                TransportException::REMOTE);
        }

        return $data;
    }
125246
protected function send(): void
    {
        if (self::$overflowed || !self::$sendHeaders) {
            return;
        }

        if (!self::$initialized) {
            self::$initialized = true;

            self::$sendHeaders = $this->headersAccepted();
            if (!self::$sendHeaders) {
                return;
            }

            self::$json['request_uri'] = $_SERVER['REQUEST_URI'] ?? '';
        }

        $json = @json_encode(self::$json);
        $data = base64_encode(utf8_encode($json));
        if (strlen($data) > 240 * 1024) {
            self::$overflowed = true;

            $record = [
                'message' => 'Incomplete logs, chrome header size limit reached',
                'context' => [],
                'level' => Logger::WARNING,
                'level_name' => Logger::getLevelName(Logger::WARNING),
                'channel' => 'monolog',
                'datetime' => new \DateTimeImmutable(),
                'extra' => [],
            ];
            self::$json['rows'][count(self::$json['rows']) - 1] = $this->getFormatter()->format($record);
            $json = @json_encode(self::$json);
            $data = base64_encode(utf8_encode($json));
        }

        if (trim($data) !== '') {
            $this->sendHeader(static::HEADER_NAME, $data);
        }
    }
48974
private function sendRequest() {
        try {
            $ch = curl_init();

            curl_setopt($ch, CURLOPT_URL, $this->url);
            curl_setopt($ch, CURLOPT_HEADER, 1);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0); 
            curl_setopt($ch, CURLOPT_TIMEOUT, 600);
            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, (isset($this->opts['timeout']) && $this->opts['timeout']) ? $this->opts['timeout'] : self::CONNECT_TIMEOUT);
            curl_setopt($ch, CURLINFO_HEADER_OUT, true);
            if($this->method == self::METHOD_POST) {
                curl_setopt($ch, CURLOPT_POST, 1); 
                if($this->sendJson) {
                    $this->postData = json_encode($this->postData);
                }
                curl_setopt($ch, CURLOPT_POSTFIELDS, $this->postData); 
            }

            if($this->headerParam) {
                if($this->sendJson) {
                    $this->headerParam = array_merge($this->headerParam, [
                        'Content-Type: application/json',
                        'Content-Length:' . strlen($this->postData)
                    ]);
                }
                curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headerParam);
            }

            $response = curl_exec($ch);
            if($response) {
                list($responseHeader, $body) = explode("\r\n\r\n", $response, 2);
                $this->body = $body;
                $this->responseHeader = $responseHeader;
            }
            $this->header = curl_getinfo($ch, CURLINFO_HEADER_OUT);
            $this->status = curl_getinfo($ch, CURLINFO_HTTP_CODE);

            if($this->debug) {
                $this->debugInfo['requestHeader'] = $this->header;
                $this->debugInfo['responseHeader'] = $this->responseHeader;
                $this->debugInfo['totalTime'] = curl_getinfo($ch, CURLINFO_TOTAL_TIME);
                $this->debugInfo['connectTime'] = curl_getinfo($ch, CURLINFO_CONNECT_TIME);
                $this->debugInfo['nameLookupTime'] = curl_getinfo($ch, CURLINFO_NAMELOOKUP_TIME);

                if($this->method == self::METHOD_POST) {
                    $this->debugInfo['postData'] = $this->postData;
                }
            }
            curl_close($ch);
        } catch(\Exception $e) {
            $this->debugInfo['exception'] = $e->getMessage();
        }
    }