Oct 29, 2015
0
Level 4
Package testing
Hi all
I just released the latest version of my cURL package. This version includes a fluent interface similar to the Laravel query builder which can be used to configure the request before sending it. I would love to have some feedback from anyone who has a little time as to how I can still improve the package in any way possible.
https://github.com/ixudra/curl
Some usage examples:
// Send a GET request to: http://www.foo.com/bar?foz=baz using JSON
Curl::to('http://www.foo.com/bar')
->withData( array( 'foz' => 'baz' ) )
->asJson()
->get();
// Send a POST request to: http://www.foo.com/bar
Curl::to('http://www.foo.com/bar')
->post();
// Send a POST request to: http://www.foo.com/bar with arguments 'foz' = 'baz' using JSON over SSL
Curl::to('http://www.foo.com/bar')
->withData( array( 'foz' => 'baz' ) )
->withOption('SSL_VERIFYPEER', false)
->post();
Thx in advance!
Please or to participate in this conversation.