Send the Slack message.

@return void
192745
public function send()
    {
        $message = $this->message ?: ($this->task ? ucwords($this->getSystemUser()).' ran the ['.$this->task.'] task.' : ucwords($this->getSystemUser()).' ran a task.');

        $payload = array_merge(['text' => $message, 'channel' => $this->channel], $this->options);

        Request::post("{$this->hook}")->sendsJson()->body($payload)->send();
    }
1270699
public function sendCodeceptionOutputToSlack($slackChannel, $slackToken = null, $codeceptionOutputFolder = null)
    {
        if (is_null($slackToken)) {
            $this->say('we are in Travis environment, getting token from ENV');

            // Remind to set the token in repo Travis settings,
            // see: http://docs.travis-ci.com/user/environment-variables/#Using-Settings
            $slackToken = getenv('SLACK_ENCRYPTED_TOKEN');
        }

        $result = $this
            ->taskSendCodeceptionOutputToSlack(
                $slackChannel,
                $slackToken,
                $codeceptionOutputFolder
            )
            ->run();

        return $result;
    }
72788
public function send()
  {
    foreach($this->headers as $header) {
      header($header);
    }

    $response = array();

    if ($this->message != null) {
      $response = $this->message;
    } elseif ($this->data != []) {
      $response = array_merge($response, $this->data);
    }

    if (is_array($response)) {
      echo json_encode($response);
      return;
    }

    echo $response;
  }
1311958
protected function send()
    {
        if (!$this->initialized) {
            $this->initialized = true;
            $this->sendHeader = $this->headersAccepted();

            if (!$this->sendHeader) {
                return;
            }
        }

        $jsonEncoded = json_encode($this->json);
        $jsonEncoded = str_replace("\n", '', $jsonEncoded);
        $encoded = base64_encode(utf8_encode($jsonEncoded));

        // Note it's 240KB to leave room for an error message
        if (strlen($encoded) > 240*1024) {
            $this->overflowed = true;

            $this->json['rows'][count($this->json['rows']) - 1] = array(
                'Logs truncated, exceeded Chrome header size limit',
                '',
                ''
            );

            $jsonEncoded = json_encode($this->json);
            $jsonEncoded = str_replace("\n", '', $jsonEncoded);
            $encoded = base64_encode(utf8_encode($jsonEncoded));
        }

        $this->sendHeader($encoded);
    }
312114
public function send()
    {
        $response = $this;

        /**
         * Headers
         */
        // Write Headers to swoole response
        foreach ($response->getHeaders() as $key => $value) {
            $this->swooleResponse->header($key, implode(';', $value));
        }

        /**
         * Cookies
         */
        foreach ((array)$this->cookies as $domain => $paths) {
            foreach ($paths ?? [] as $path => $item) {
                foreach ($item ?? [] as $name => $cookie) {
                    if ($cookie instanceof Cookie) {
                        $this->swooleResponse->cookie($cookie->getName(), $cookie->getValue() ? : 1, $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly());
                    }
                }
            }
        }

        /**
         * Status code
         */
        $this->swooleResponse->status($response->getStatusCode());

        /**
         * Body
         */
        $this->swooleResponse->end($response->getBody()->getContents());
    }
73956
public function sendFailed()
    {
        $messages = Message::findAll(['status' => Message::STATUS_ERROR]);
        foreach ($messages as $message) {
            try {
                $message->status = $this->send($message) > 0 ? Message::STATUS_SUCCESS : Message::STATUS_ERROR;
                $message->save(true, ['status']);
            } catch (\Exception $e) {
                $message->status = Message::STATUS_FATAL_ERROR;
                $message->save(true, ['status']);
                $this->stderr($e->getMessage());
            }
        }
    }
247849
def send_slack_message(channel, text):
    """"""
    http = httplib2.Http()
    return http.request(SLACK_MESSAGE_URL, 'POST', body=json.dumps({
        'channel': channel,
        'text': text,
    }))
832292
public function send()
    {

        if (headers_sent()) {
            throw new HttpException(Response::STATUS_INTERNAL_SERVER_ERROR, 'Headers already send');
        }

        header($this->getStatusLine());

        foreach ($this->headers as $header) {
            header($header);
        }

        echo $this->body;
    }
632797
public static function send(): void
    {
        $format = static::getResponseFormat();
        if ($format === 'unknown') {
            return;
        }

        if (count(static::$records)) {
            if ($format === 'html') {
                static::writeOutput('<script>' . static::generateScript() . '</script>');
            } elseif ($format === 'js') {
                static::writeOutput(static::generateScript());
            }
            static::resetStatic();
        }
    }
830509
public function send()
    {
        if ($this->content === null) {
            return;
        }

        if ($this->outputFormat === self::OUTPUTFORMAT_RAW) {
            echo $this->content;
            return;
        }

        if ($this->outputFormat === self::OUTPUTFORMAT_PLAIN) {
            echo strip_tags($this->content);
            return;
        }

        $content = $this->getContent();
        if ($this->hasColorSupport() === true) {
            $content =  preg_replace('|\<b>(((?!\</b>).)*)\</b>|', "\x1B[" . self::STYLE_BRIGHT . "m\$1\x1B[0m", $content);
            $content =  preg_replace('|\<i>(((?!\</i>).)*)\</i>|', "\x1B[" . self::STYLE_ITALIC . "m\$1\x1B[0m", $content);
            $content =  preg_replace('|\<u>(((?!\</u>).)*)\</u>|', "\x1B[" . self::STYLE_UNDERLINED . "m\$1\x1B[0m", $content);
            $content =  preg_replace('|\<em>(((?!\</em>).)*)\</em>|', "\x1B[" . self::STYLE_INVERSE . "m\$1\x1B[0m", $content);
            $content =  preg_replace('|\<strike>(((?!\</strike>).)*)\</strike>|', "\x1B[" . self::STYLE_STRIKETHROUGH . "m\$1\x1B[0m", $content);
            $content =  preg_replace('|\<error>(((?!\</error>).)*)\</error>|', "\x1B[" . self::STYLE_ERROR . "m\$1\x1B[0m", $content);
            $content =  preg_replace('|\<success>(((?!\</success>).)*)\</success>|', "\x1B[" . self::STYLE_SUCCESS . "m\$1\x1B[0m", $content);
        } else {
            $content =  preg_replace('|\<b>(((?!\</b>).)*)\</b>|', "$1", $content);
            $content =  preg_replace('|\<i>(((?!\</i>).)*)\</i>|', "$1", $content);
            $content =  preg_replace('|\<u>(((?!\</u>).)*)\</u>|', "$1", $content);
            $content =  preg_replace('|\<em>(((?!\</em>).)*)\</em>|', "$1", $content);
            $content =  preg_replace('|\<strike>(((?!\</strike>).)*)\</strike>|', "$1", $content);
            $content =  preg_replace('|\<error>(((?!\</strike>).)*)\</error>|', "$1", $content);
            $content =  preg_replace('|\<success>(((?!\</strike>).)*)\</success>|', "$1", $content);
        }
        echo $content;
    }
143716
public function sendToSlack($channel)
    {
        $attachments = $this->prepareSlackAttachment();

        Artisan::call('slack:post', [
            'to'      => $channel,
            'attach'  => $attachments,
            'message' => "Stats of the " . Carbon::now()->toFormattedDateString()
        ]);
    }
1212091
public function send(): void
    {
        // status
        if ($this->httpVersion == Http::VERSION_1_0 || $this->httpVersion == Http::VERSION_1_1) {
            header(sprintf('%s %s %s', $this->httpVersion, $this->status->getCode(), $this->status->getText()));
        } elseif ($this->httpVersion == Http::VERSION_2) {
            header(sprintf('%s %s', $this->httpVersion, $this->status->getCode()));
        }

        // load time
        $exposeAppLoadTime = $this->app->configValue('exposeAppLoadTime');
        if ($exposeAppLoadTime === true || $exposeAppLoadTime === $this->app->env()) {
            $this->sendHeader('X-App-Load-Time', $this->app->loadTime());
        }

        [$contentType, $contentCharset, $contentLength] = $this->body->toArray();

        // content type/charset?/length
        if ($this->body->isImage()) {
            $this->sendHeader('Content-Type', $contentType);
        } elseif ($contentType == '') {
            $this->sendHeader('Content-Type', 'n/a');
        } elseif ($contentCharset == '' || in_array($contentType, ['n/a', 'none'])) {
            $this->sendHeader('Content-Type', $contentType);
        } else {
            $this->sendHeader('Content-Type', sprintf('%s; charset=%s', $contentType, $contentCharset));
        }
        $this->sendHeader('Content-Length', (string) $contentLength);

        // print it baby!
        print $this->body->toString();
    }
179494
public function postCommit(
        InputInterface $input,
        OutputInterface $output,
        ParameterBagInterface $configuration
    ): void {
        // Yes we can send a notification to slack fx?
        // Then we would just add some configuration with slack channel, username etc etc
        // And then require the slack API via composer and do the code here

        // But very simple, we can say Hello World! to the console
        $output->write('Hello World!');
    }
350256
public function send()
    {
        $mimeMessage = $this->createMimeMessage();
        $this->message = $mimeMessage;
        $this->preparingSend();
        imap_mail(
            $this->properties->to,
            $this->properties->subject,
            $this->properties->message,
            $this->properties->additional_headers,
            $this->properties->cc,
            $this->properties->bcc,
            $this->properties->rpath
        );
    }
54194
public function send()
	{
		if(!$this->verify())
			throw new \MalformesResponseException("Malformed response");
		else
		{
			http_response_code($this->statusCode);
			
			foreach($this->headers as $header => $value)
			{
				header($header . ': ' . $value);
			}
		}
		
		echo $this->body;
	}
423817
protected function flow(): void
	{
		// Erase output buffers and disable output buffering

		while(ob_get_level() > 0) ob_end_clean();

		// Send the stream

		$stream = $this->stream;

		$stream($this);

		// Send empty chunk to tell the client that we're done

		$this->flush(null, true);
	}
33584
public function send()
    {
        deprecationWarning('Response::send() will be removed in 4.0.0');

        if ($this->hasHeader('Location') && $this->_status === 200) {
            $this->statusCode(302);
        }

        $this->_setContent();
        $this->sendHeaders();

        if ($this->_file) {
            $this->_sendFile($this->_file, $this->_fileRange);
            $this->_file = null;
            $this->_fileRange = [];
        } else {
            $this->_sendContent($this->body());
        }

        if (function_exists('fastcgi_finish_request')) {
            fastcgi_finish_request();
        }
    }