osadchyi-s / incoming-curl
Make curl command line from incoming request
0.1.0
2016-10-30 17:03 UTC
Requires
- php: >=5.6
- illuminate/http: ^5.3
Requires (Dev)
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2025-04-20 02:49:17 UTC
README
This package for creating curl command line from incoming request data.
Install
Via Composer
$ composer require osadchyi-s/incoming-curl
Usage
Make current incoming curl from global data
$curlLine = IncomingCurl::makeCurlFromGlobals();
Make curl from custom data
$IC = new IncomingCurl(); $IC->setUrl('http://example'); $IC->setBody(json_encode(['test'=>1])); $IC->setHeaders([ [ 'Content-Type'=> ['appliation/json'] ] ]); $IC->setMethod('GET'); $curlLine = $IC->makeCurlCommandLine();
Credits
License
The GPL3 License. Please see License File for more information.