hipsterjazzbo/fire-and-forget
最新稳定版本:0.1.6
Composer 安装命令:
composer require hipsterjazzbo/fire-and-forget
包简介
A simple PHP library to just fire off an HTTP request and forget about it
README 文档
README
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);
统计信息
- 总下载量: 9.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-02-04