PHP code example of fyre / message

1. Go to this page and download the library: Download fyre/message library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fyre / message example snippets


use Fyre\Http\Message;

$message = new Message($options);

$newMessage = $message->appendBody($data);

$newMessage = $message->appendHeader($name, $value);

$body = $message->getBody();

$header = $message->getHeader($name);

$headers = $message->getHeaders();

$value = $message->getHeaderValue($name);

$version = $message->getProtocolVersion();

$hasHeader = $message->hasHeader($name);

$newMessage = $message->prependHeader($name, $value);

$newMessage = $message->removeHeader($name);

$newMessage = $message->setBody($data);

$newMessage = $message->setHeader($name, $value);

$newMessage = $message->setProtocolVersion($version);