osadchyi-s / incoming-curl
Make curl command line from incoming request
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/osadchyi-s/incoming-curl
Requires
- php: >=5.6
- illuminate/http: ^5.3
Requires (Dev)
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2025-10-20 03:56:18 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.