Skip to content

SuperDumbTM/php-simple-requester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

php-simple-requester

A simple PHP cURL warpper

Usage

// get request
$response = HTTPRequester::init("https://api.ipify.org")
    ->setQuery(['format' => "json"])
    ->get()
    ->jsonResponse();

// post request
$requester = HTTPRequester::init("https://post-to-this-site.com")
    ->setHeader(['Content-Type' => "application/json])
    ->setJsonPayload(['foo' => 'bar'])
    ->post();

$requester->jsonResponse();
$requester->url();
$requester->remoteIp();

About

A simple PHP cURL warpper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages