lackone/curl

简单的curl组件,用于get和post请求

1.0.0 2018-04-25 07:14 UTC

This package is not auto-updated.

Last update: 2024-06-05 19:57:56 UTC


README

使用composer创建一个curl组件,用于简单的get和post请求。

如何使用

1、引入

composer require lackone/curl

2、使用命名空间

use Lackone\Curl;

3、get请求

$data = Curl::get('http://www.baidu.com');

4、post请求

$data = Curl::post('http://127.0.0.1/test', ['name' => 'test']);

5、上传文件

$data = Curl::post('http://127.0.0.1/test', ['file' => '@./README.md']);