Download the PHP package 200mph/curl-wrap without Composer
On this page you can find all versions of the php package 200mph/curl-wrap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download 200mph/curl-wrap
More information about 200mph/curl-wrap
Files in 200mph/curl-wrap
Download 200mph/curl-wrap
More information about 200mph/curl-wrap
Files in 200mph/curl-wrap
Vendor 200mph
Package curl-wrap
Short Description Lightweight CURL wrapper for PHP
License MIT
Homepage https://github.com/200MPH/curl-wrap
Package curl-wrap
Short Description Lightweight CURL wrapper for PHP
License MIT
Homepage https://github.com/200MPH/curl-wrap
Please rate this library. Is it a good library?
Informations about the package curl-wrap
PHP CURL Wrapper
This is simple wrapper for PHP CURL.
<?php
use thm\curl\Curl;
// Include auto loader for testing purpose.
// I assume you've already done it in your project.
require_once '../vendor/autoload.php';
// Initialize object
$curl = new Curl("http://api.nbp.pl/api/exchangerates/tables/A/today/?format=json");
// Change default timeout (5 seconds) - optional
$curl->setTimeout(2);
// GET
$response = $curl->get();
// POST
//$response = $curl->post();
//$response = $curl->post($params, $files, $headers);
// SEND JSON
//$response = $curl->json($json);
// Binary
//$response = $curl->binary($data);
// PATCH
//$response = $curl->patch();
// PUT
//$response = $curl->put();
// DELETE
//$response = $curl->delete();
$status = $response->getStatus();
$body = $response->getBody();
$time = $response->getResponseTime();
$errorStr = $response->getError();
$errorCode = $response->getErrorNo();
$moreInfo = $response->getInfo();All versions of curl-wrap with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.4
The package 200mph/curl-wrap contains the following files
Loading the files please wait ...