Download the PHP package biganfa/php2curl without Composer
On this page you can find all versions of the php package biganfa/php2curl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php2curl
php2curl
Convert PHP request to raw cURL instantly.
This tiny lib analyzes PHP globals ($_REQUEST
, etc.) and creates identical cURL command out of it.
You can then immediately import it to Postman in 2 clicks via Import -> Paste Raw Text
Possible use cases
-
importing web request from PHP code to plain cURL
-
importing web request from PHP code to Postman
-
cowboy style debugging while xdebug is not available (e.g. production)
-
trying to debug a microservice
-
sharing a request with a co-worker
- so on
Examples
-
zero configuration! copy/paste single line, initiate web request, result will be found in
$curl
variable: -
if you think eval is not acceptable, you can just copy the contents of
generated/snippet.php
and paste it anywhere in your project.$curl
variable will hold the desired cURL command. - you can install the library as usual via composer (see example.php)
Known limitations (pull requests are welcome!)
- files are not supported
Tests
License information
see LICENSE file