ryodevz/httpfulwrapper

A Wrapper class for httpful library to make it easy to use.

v2.0.0 2021-08-31 16:43 UTC

This package is auto-updated.

Last update: 2024-10-29 06:12:26 UTC


README

Latest Version Total Downloads

Features

Get request Post request Put request

Installing Httpfulwrapper

The recommended way to install httpfulwrapper is through Composer.

composer require ryodevz/httpfulwrapper

Get

use Ryodevz\HttpfulWrapper\Http;

require_once 'vendor/autoload.php';

// Make a request
$request = Http::get('https://ytryo.my.id/api/animeku/search?q=naruto');

// Send
$response = $request->send();

// Body
var_dump($response->body);

Post

use Ryodevz\HttpfulWrapper\Http;
use Ryodevz\HttpfulWrapper\Mime;

require_once 'vendor/autoload.php';

$response = Http::post('https://example.com/login', [
    'email' => 'zulzariozairi@gmail.com',
    'password' => 'secret'
], Mime::FORM)->send();

var_dump($response->body);

Mimes