Coder Social home page Coder Social logo

fire-and-forget's Introduction

FireAndForget

A simple PHP library to just fire off an HTTP request and forget about it

Installation

To get started, require this package in your composer.json and run composer update:

"hipsterjazzbo/fire-and-forget": "0.1.*"

If you're using Laravel

After updating composer, add the ServiceProvider to the providers array in app/config/app.php:

'HipsterJazzbo\FireAndForget\FireAndForgetServiceProvider',

You'll probably want to set up the alias:

'FireAndForget' => 'HipsterJazzbo\FireAndForget\Facades\FireAndForgetFacade'

You could also publish the config file:

php artisan config:publish hipsterjazzbo/fire-and-forget

Usage

Just call one of the methods (get, post, put, delete) and get on with your life. FireAndForget will compile the request, open a socket, fire the request and immediately close and return.

Note All the methods have the same signature.

// You can define a connection timeout, the default is 5
$connectionTimeout = 5;

$faf = new FireAndForget($connectionTimeout);
$faf->post($url, $params);

Or, if you're using Laravel,

FireAndForget::post($url, $params);

fire-and-forget's People

Stargazers

 avatar wsmwason avatar Victor Boctor avatar Tmy2017 avatar Micnet avatar Alex avatar tomospin avatar Bogdan Podlesnii avatar Wallace Maxters avatar Adnan Ahmed avatar Braunson Yager avatar

Watchers

 avatar James Cloos avatar Brody Nelson avatar Julien Benichou avatar Victor Yuen avatar

fire-and-forget's Issues

The package seems not working

Hi there,
I used to use aura-is-here package and it worked. When I saw composer message tell me to update the pakage i did the upgrade, and now the new package seems do not work. I've tried also the old package (the aura-is-here) but it won't work.
I have do this trial:

  • I've created a script that first call another script with the classical get and then with the fireAndForget. The called script send an email to me.
  • With get the email arrives, with F&F it doesn't.
    Could you help me figuring why?

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.