{"id":24016305,"url":"https://github.com/decodelabs/hydro","last_synced_at":"2026-03-27T03:43:13.517Z","repository":{"id":200431784,"uuid":"705675256","full_name":"decodelabs/hydro","owner":"decodelabs","description":"Simple HTTP client wrapper around Guzzle","archived":false,"fork":false,"pushed_at":"2025-06-06T14:24:35.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-06-06T14:45:34.570Z","etag":null,"topics":["client","http","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/decodelabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2023-10-16T13:30:58.000Z","updated_at":"2025-06-06T14:24:37.000Z","dependencies_parsed_at":"2025-02-15T10:25:43.146Z","dependency_job_id":"d4fec12a-8f8e-4920-aa46-c1015f997faa","html_url":"https://github.com/decodelabs/hydro","commit_stats":null,"previous_names":["decodelabs/hydro"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/decodelabs/hydro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodelabs%2Fhydro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodelabs%2Fhydro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodelabs%2Fhydro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodelabs%2Fhydro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decodelabs","download_url":"https://codeload.github.com/decodelabs/hydro/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodelabs%2Fhydro/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263182156,"owners_count":23426627,"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":["client","http","php"],"created_at":"2025-01-08T08:48:54.557Z","updated_at":"2026-03-27T03:43:13.452Z","avatar_url":"https://github.com/decodelabs.png","language":"PHP","readme":"# Hydro\n\n[![PHP from Packagist](https://img.shields.io/packagist/php-v/decodelabs/hydro?style=flat)](https://packagist.org/packages/decodelabs/hydro)\n[![Latest Version](https://img.shields.io/packagist/v/decodelabs/hydro.svg?style=flat)](https://packagist.org/packages/decodelabs/hydro)\n[![Total Downloads](https://img.shields.io/packagist/dt/decodelabs/hydro.svg?style=flat)](https://packagist.org/packages/decodelabs/hydro)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/decodelabs/hydro/integrate.yml?branch=develop)](https://github.com/decodelabs/hydro/actions/workflows/integrate.yml)\n[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-44CC11.svg?longCache=true\u0026style=flat)](https://github.com/phpstan/phpstan)\n[![License](https://img.shields.io/packagist/l/decodelabs/hydro?style=flat)](https://packagist.org/packages/decodelabs/hydro)\n\n### Simple HTTP client wrapper around Guzzle\n\nHydro provides a simple interface to common HTTP client functionality using Guzzle under the hood.\n\n---\n\n## Installation\n\nInstall via Composer:\n\n```bash\ncomposer require decodelabs/hydro\n```\n\n## Usage\n\nBasic usage for different types of files:\n\n```php\nuse DecodeLabs\\Hydro;\n\n$memoryFile = Hydro::get('https://example.com/file.txt'); // Atlas file\n$string = Hydro::getString('https://example.com/file.txt'); // String\n$file = Hydro::getFile('https://example.com/file.txt', '/path/to/save/file.txt'); // Local file\n$tempFile = Hydro::getTempFile('https://example.com/file.txt'); // Temp file\n$json = Hydro::getJson('https://example.com/file.json'); // Decoded JSON array\n$tree = Hydro::getJsonTree('https://example.com/file.json'); // Decoded JSON Collections/Tree\n```\n\n### Options\n\nPass an array of options (including URL) to the underlying client:\n\n```php\nHydro::get([\n    'url' =\u003e 'https://example.com/file.txt',\n    'timeout' =\u003e 10\n]);\n```\n\n### Errors\n\nHandle error status responses (or return alternative response):\n\n```php\n$file = Hydro::get('https://example.com/file.txt', function($response) {\n    switch($response-\u003egetStatusCode()) {\n        case 404:\n            throw Exceptional::Notfound(\n                message: 'File not found'\n            );\n\n        case 500:\n            throw Exceptional::Runtime(\n                message: 'Server error'\n            );\n\n        default:\n            return Hydro::request('GET', 'https://example.com/other.txt');\n    }\n});\n```\n\n## Licensing\n\nHydro is licensed under the proprietary License. See [LICENSE](./LICENSE) for the full license text.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecodelabs%2Fhydro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecodelabs%2Fhydro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecodelabs%2Fhydro/lists"}