PHP code example of hamlet-framework / http-message
1. Go to this page and download the library: Download hamlet-framework/http-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/ */
hamlet-framework / http-message example snippets
$message = Message::empty()
->withProtocolVersion('1.1')
->withHeader('Host', 'example.net');
$message = Message::validatingBuilder()
->withProtocolVersion('1.1')
->withBody($body)
->withHeaders($headers)
->build();
$message = Message::nonValidatingBuilder()
->withProtocolVersion('1.1')
->withBody($body)
->withHeaders($headers)
->build();