huangdijia/http-client

HTTP client base curl, like laravel HTTP client

0.1.1 2020-11-04 01:07 UTC

This package is auto-updated.

Last update: 2024-07-04 09:59:38 UTC


README

http-client

Latest Version on Packagist Total Downloads GitHub license

HTTP client base curl, like laravel HTTP client.

Installation

Quick start

GET

use Huangdijia\Http\Client;

$response = Client::get($url);

POST

use Huangdijia\Http\Client;

$response = Client::post($url, $data);

UPLOAD

use Huangdijia\Http\Client;

$response = Client::post($url, ['file' => curl_file_create($fileRealpath)]);

Other uses

Laravel HTTP Client

Laravel HTTP 客户端