{"id":15173122,"url":"https://github.com/drupol/drupal7_http_client","last_synced_at":"2025-10-01T10:31:20.582Z","repository":{"id":56972688,"uuid":"108181267","full_name":"drupol/drupal7_http_client","owner":"drupol","description":"PHP-HTTP/HTTPlug client for Drupal 7","archived":true,"fork":false,"pushed_at":"2017-12-03T20:48:13.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-17T09:23:58.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drupol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-24T20:42:29.000Z","updated_at":"2023-01-28T00:32:22.000Z","dependencies_parsed_at":"2022-08-21T11:20:13.310Z","dependency_job_id":null,"html_url":"https://github.com/drupol/drupal7_http_client","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupol%2Fdrupal7_http_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupol%2Fdrupal7_http_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupol%2Fdrupal7_http_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupol%2Fdrupal7_http_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drupol","download_url":"https://codeload.github.com/drupol/drupal7_http_client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234858838,"owners_count":18897818,"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":[],"created_at":"2024-09-27T10:41:17.765Z","updated_at":"2025-10-01T10:31:20.314Z","avatar_url":"https://github.com/drupol.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/drupol/drupal7_http_client.svg?branch=master)](https://travis-ci.org/drupol/drupal7_http_client)\n\n# Drupal 7 HTTP Client\n\nThis is a small experimental library to bridge [HTTPlug](https://github.com/php-http/httplug) and Drupal 7.\n\nThe function sending requests in Drupal 7 is [drupal_http_request()](https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_http_request/7.x).\nThe return of it is not [PSR-7](http://www.php-fig.org/psr/psr-7/) compatible.\n\nThis library standardize this and allows you to send HTTP requests and get HTTP responses in [PSR-7 standard](http://www.php-fig.org/psr/psr-7/) by using Drupal 7 API.\n\n## Installation\n\n```php\ncomposer require drupol\\drupal7_http_client\n```\n\n## Usage\n\nA **GET** request:\n\n```php\n  $client = new \\Http\\Client\\Drupal7\\Client();\n  $message = new \\Http\\Message\\Drupal7\\MessageFactory();\n\n  $request = $message-\u003ecreateRequest('GET', 'http://google.com/');\n  $response = $client-\u003esendRequest($request);\n```\n\nA **POST** request:\n\n```php\n  $uri = 'http://google.com/';\n  $data = array(\n    'body' =\u003e 'Lorem Ipsum Dolor Sit Amet',\n  );\n\n  $client = new \\Http\\Client\\Drupal7\\Client();\n  $message = new \\Http\\Message\\Drupal7\\MessageFactory();\n\n  $request = $message-\u003ecreateRequest('POST', $uri, array(), drupal_http_build_query($data));\n  $response = $client-\u003esendRequest($request);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrupol%2Fdrupal7_http_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrupol%2Fdrupal7_http_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrupol%2Fdrupal7_http_client/lists"}