n0nag0n/easy-curl

A simple wrapper library to make it easy to work with cURL (and to stop you from googling all the curl_setopt() you need)

v1.0.5 2020-03-18 23:04 UTC

This package is auto-updated.

Last update: 2024-12-07 21:54:09 UTC


README

This is a super simple library to interact with curl.

Install with composer cause that's what all the cool kids use these days.

composer require n0nag0n/easy-curl

Basic Usage

<?php
	include('/path/to/vendor/autoload.php');

	use n0nag0n\EasyCurl;

	echo EasyCurl::getRequest('https://www.google.com/');

	$result = EasyCurl::postRequest('https://example.com/v1/endpoint', [ 'is_json_request' => true, 'post_body' => '{"json":"values"}' ]);

Check out the file on your own for documenation. It's pretty dang simple.