{"id":20261388,"url":"https://github.com/haruncpi/http","last_synced_at":"2025-04-11T01:45:24.457Z","repository":{"id":62514841,"uuid":"469078220","full_name":"haruncpi/http","owner":"haruncpi","description":"Simple HTTP client for PHP","archived":false,"fork":false,"pushed_at":"2023-07-22T11:07:52.000Z","size":3,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T22:51:24.439Z","etag":null,"topics":["curl","http-client","php","php-curl-library","php-http-client"],"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/haruncpi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-12T12:37:16.000Z","updated_at":"2025-03-01T10:50:09.000Z","dependencies_parsed_at":"2024-11-14T11:29:25.858Z","dependency_job_id":"d27a693a-ead3-49b6-9909-06946464d55a","html_url":"https://github.com/haruncpi/http","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haruncpi%2Fhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haruncpi%2Fhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haruncpi%2Fhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haruncpi%2Fhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haruncpi","download_url":"https://codeload.github.com/haruncpi/http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322597,"owners_count":21084336,"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":["curl","http-client","php","php-curl-library","php-http-client"],"created_at":"2024-11-14T11:25:29.426Z","updated_at":"2025-04-11T01:45:24.439Z","avatar_url":"https://github.com/haruncpi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple HTTP client for PHP\n\nInstall  \n```\ncomposer require haruncpi/http\n```  \n\nImport class  \n```php\nuse Haruncpi\\Http\\Http;\n```\n\n### GET request\n```php\n$url    = \"https://jsonplaceholder.typicode.com/comments\";\n$data   = [ 'postId' =\u003e 1 ];\n\n$response = HTTP::get( $url, $data );\n```\n### POST request\n```php\n$url    = \"https://jsonplaceholder.typicode.com/posts\";\n$data   = [ 'title' =\u003e 'This is post title' ];\n\n$response = HTTP::post( $url, $data );\n```\n\n### More options\n```php\n$response = HTTP::get( $url, $data, $headers, $curlOptions );\n$response = HTTP::post( $url, $data, $headers, $curlOptions );\n```\n\n### Useful methods\n```php\n$response-\u003egetStatusCode(); // to get response code\n$response-\u003egetHeaders(); // to get all headers as array\n$response-\u003egetHeader($name); // to get specific header\n$response-\u003egetBody(); // to get raw response body\n$response-\u003egetJson(); // to get body as assoc array\n$response-\u003egetObject(); // to get body as object\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharuncpi%2Fhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharuncpi%2Fhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharuncpi%2Fhttp/lists"}