Jump to content

php-https — Lightweight, Secure HTTP Client for PHP (cURL-powered, PSR-7 style)


Recommended Posts

Hey Friends ?

I’d like to introduce a new open-source library I’ve built called php-https, designed to simplify and secure HTTP/HTTPS requests in PHP. It’s lightweight, fast, and built on top of cURL, with a clean, PSR-7-inspired API.

GitHub Repo: https://github.com/broosaction/php-https

Features

  • Simple API for GET, POST, PUT, DELETE, PATCH, HEAD
  • JSON support, file uploads, proxy, cookies, headers
  • Authentication (Basic, Bearer, Token)
  • Custom timeouts, redirects, and SSL options
  • Response parsing with status codes, headers, body
  • Works with raw cURL or abstracted interface

Example Usage

use Https\Request;

$response = Request::get('https://api.example.com/data');

if ($response->ok()) {
    echo $response->json()['message'];
}

Installation

composer require broosaction/php-https

 

Contributions Welcome

Feel free to:

I built this to help streamline API integrations in PHP projects, especially for developers working in resource-constrained environments. Feedback, suggestions, and improvements are welcome!

Let’s make PHP HTTP requests cleaner and safer together.

Bruce Truth,

Founder @Broos Action

 

Edited by BroosAction
hi reference
  • Like 1

I only scanned your project but I have a few questions I'd like to see answered:

  • Why would someone want to use your library when there are libraries like Guzzle or Symfony's HTTP Client that do the same thing?
  • I didn't see any unit tests.  Are you planning to add those?  I think that's pretty much a requirement these days if you want people to adopt and have confidence using a new library.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.