Skip to content

lyoshenka/curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lyoshenka/curl

A simple wrapper around Curl to make it easy to use.

No more curl_init(), no more struggling to get response headers, etc.

Two ways to use it

The functional way

echo \lyoshenka\curl::get('http://httpbin.org/user-agent', [], ['headers' => ['User-Agent' => 'nice!']]);

The fluent OO way

echo \lyoshenka\curl::init()
  ->setMethod('GET')
  ->setUrl('http://httpbin.org/user-agent')
  ->setHeader('User-Agent', 'also nice!')
  ->send()
  ->getBody();

About

A better way to use curl in PHP

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages