Coder Social home page Coder Social logo

laravel-http-to-curl's Introduction

Laravel HTTP to Curl

Simple tool to dump the raw curl command from Laravel HTTP Request.

Installation

You can pull in the package via composer:

composer require jigarakatidus/laravel-http-to-curl

The package will automatically register itself

Usage

Http::ddWithCurl()
    ->acceptJson()
    ->asForm()
    ->withBasicAuth('username', 'password')
    ->get('https://example.com/padfhj', [
        'foo' => 'foobar',
        'bar' => 'barfoo',
    ]);

Outputs

curl -H 'User-Agent: GuzzleHttp/7' -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' -H 'Host: example.com' -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' -X 'GET' 'https://example.com/padfhj?foo=foobar&bar=barfoo'

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Pull Requests are welcome.

Security

If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

laravel-http-to-curl's People

Contributors

jigar-dhulla avatar matthewnessworthy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laravel-http-to-curl's Issues

Please make this package Laravel 10 compatible/compliant

As per version 10 of Laravel, they recommend/require the minimal-stability attribute in the composer.json to be stable.

[Minimum Stability](https://laravel.com/docs/10.x/upgrade#updating-minimum-stability)

You should update the minimum-stability setting in your application's composer.json file to stable

This causes the upgrade to fail if you have this package installed.

  Problem 1
    - Root composer.json requires jigarakatidus/laravel-http-to-curl ^1.0.0-alpha -> satisfiable by jigarakatidus/laravel-http-to-curl[1.0.0-alpha].
    - jigarakatidus/laravel-http-to-curl 1.0.0-alpha requires jigarakatidus/command-line-generator ^1.0.0-alpha -> found jigarakatidus/command-line-generator[1.0.0-alpha] but it does not match your minimum-stability.

I tried reverting the minimum stability back to what it was before but that breaks the upgrade process entirely.

You don't need to update any code, the version numbering should be fixed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.