{"id":21467432,"url":"https://github.com/elusivecodes/fyremessage","last_synced_at":"2025-07-15T05:31:27.633Z","repository":{"id":62508430,"uuid":"435829365","full_name":"elusivecodes/FyreMessage","owner":"elusivecodes","description":"FyreMessage is a free, open-source HTTP message library for PHP.","archived":false,"fork":false,"pushed_at":"2024-10-27T12:41:48.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-28T15:45:37.125Z","etag":null,"topics":["http","message","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elusivecodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-07T10:05:49.000Z","updated_at":"2024-10-27T12:40:51.000Z","dependencies_parsed_at":"2024-06-29T07:41:40.404Z","dependency_job_id":null,"html_url":"https://github.com/elusivecodes/FyreMessage","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreMessage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreMessage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreMessage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreMessage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elusivecodes","download_url":"https://codeload.github.com/elusivecodes/FyreMessage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226017512,"owners_count":17560525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http","message","php"],"created_at":"2024-11-23T08:18:06.849Z","updated_at":"2024-11-23T08:18:07.447Z","avatar_url":"https://github.com/elusivecodes.png","language":"PHP","readme":"# FyreMessage\r\n\r\n**FyreMessage** is a free, open-souce immutable HTTP message library for *PHP*.\r\n\r\n\r\n## Table Of Contents\r\n- [Installation](#installation)\r\n- [Basic Usage](#basic-usage)\r\n- [Methods](#methods)\r\n\r\n\r\n\r\n## Installation\r\n\r\n**Using Composer**\r\n\r\n```\r\ncomposer require fyre/message\r\n```\r\n\r\nIn PHP:\r\n\r\n```php\r\nuse Fyre\\Http\\Message;\r\n```\r\n\r\n\r\n## Basic Usage\r\n\r\n- `$options` is an array containing the message options.\r\n    - `body` is a string representing the message body, and will default to \"\".\r\n    - `headers` is an array containing headers to set, and will default to *[]*.\r\n    - `protocolVersion` is a string representing the protocol version, and will default to \"*1.1*\".\r\n\r\n```php\r\n$message = new Message($options);\r\n```\r\n\r\n\r\n## Methods\r\n\r\n**Append Body**\r\n\r\nAppend data to the message body.\r\n\r\n- `$data` is a string representing the data to append.\r\n\r\n```php\r\n$newMessage = $message-\u003eappendBody($data);\r\n```\r\n\r\n**Append Header**\r\n\r\nAppend a value to a message [*Header*](https://github.com/elusivecodes/FyreHeader).\r\n\r\n- `$name` is a string representing the [*Header*](https://github.com/elusivecodes/FyreHeader) name.\r\n- `$value` is a string representing the [*Header*](https://github.com/elusivecodes/FyreHeader) value.\r\n\r\n```php\r\n$newMessage = $message-\u003eappendHeader($name, $value);\r\n```\r\n\r\n**Get Body**\r\n\r\nGet the message body.\r\n\r\n```php\r\n$body = $message-\u003egetBody();\r\n```\r\n\r\n**Get Header**\r\n\r\nGet a message [*Header*](https://github.com/elusivecodes/FyreHeader).\r\n\r\n- `$name` is a string representing the [*Header*](https://github.com/elusivecodes/FyreHeader) name.\r\n\r\n```php\r\n$header = $message-\u003egetHeader($name);\r\n```\r\n\r\n**Get Headers**\r\n\r\nGet the message headers.\r\n\r\n```php\r\n$headers = $message-\u003egetHeaders();\r\n```\r\n\r\n**Get Header Value**\r\n\r\nGet a message [*Header*](https://github.com/elusivecodes/FyreHeader) value.\r\n\r\n- `$name` is a string representing the [*Header*](https://github.com/elusivecodes/FyreHeader) name.\r\n\r\n```php\r\n$value = $message-\u003egetHeaderValue($name);\r\n```\r\n\r\n**Get Protocol Version**\r\n\r\nGet the protocol version.\r\n\r\n```php\r\n$version = $message-\u003egetProtocolVersion();\r\n```\r\n\r\n**Has Header**\r\n\r\nDetermine whether the message has a [*Header*](https://github.com/elusivecodes/FyreHeader).\r\n\r\n- `$name` is a string representing the [*Header*](https://github.com/elusivecodes/FyreHeader) name.\r\n\r\n```php\r\n$hasHeader = $message-\u003ehasHeader($name);\r\n```\r\n\r\n**Prepend Header**\r\n\r\nPrepend a value to a message [*Header*](https://github.com/elusivecodes/FyreHeader).\r\n\r\n- `$name` is a string representing the [*Header*](https://github.com/elusivecodes/FyreHeader) name.\r\n- `$value` is a string representing the [*Header*](https://github.com/elusivecodes/FyreHeader) value.\r\n\r\n```php\r\n$newMessage = $message-\u003eprependHeader($name, $value);\r\n```\r\n\r\n**Remove Header**\r\n\r\nRemove a [*Header*](https://github.com/elusivecodes/FyreHeader).\r\n\r\n- `$name` is a string representing the [*Header*](https://github.com/elusivecodes/FyreHeader) name.\r\n\r\n```php\r\n$newMessage = $message-\u003eremoveHeader($name);\r\n```\r\n\r\n**Set Body**\r\n\r\nSet the message body.\r\n\r\n- `$data` is a string representing the message body.\r\n\r\n```php\r\n$newMessage = $message-\u003esetBody($data);\r\n```\r\n\r\n**Set Header**\r\n\r\nSet a message [*Header*](https://github.com/elusivecodes/FyreHeader).\r\n\r\n- `$name` is a string representing the [*Header*](https://github.com/elusivecodes/FyreHeader) name.\r\n- `$value` is a string representing the [*Header*](https://github.com/elusivecodes/FyreHeader) value.\r\n\r\n```php\r\n$newMessage = $message-\u003esetHeader($name, $value);\r\n```\r\n\r\n**Set Protocol Version**\r\n\r\nSet the protocol version.\r\n\r\n- `$version` is a string representing the protocol version.\r\n\r\n```php\r\n$newMessage = $message-\u003esetProtocolVersion($version);\r\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felusivecodes%2Ffyremessage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felusivecodes%2Ffyremessage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felusivecodes%2Ffyremessage/lists"}