定制 alirexa/curlreq 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

alirexa/curlreq

Composer 安装命令:

composer require alirexa/curlreq

包简介

A simple and easy php class for send curl request

README 文档

README

A simple and easy php class for send curl request

install package using :

composer require alirexa/curlreq

init curl with this :

$request = new CurlReq();

$request->setUrl("example.com/something");

$request->json(); //data will json encoded and json headers add

$request->setData($data); //add data in array

$request->setHeaders($your_array_headers); // set  headers

$request->setTimeOut($Second); //request timeout

you can trun Exception on or off by call Exception(false or true) on true exception will throw and on false will not default is false :

$request->Exception(false); # exception off
$request->Exception(true); # exception on

use get,post,put,delete method base on url accepted method :

$request->get();
$request->post();
$request->put();
$request->delete();

Response detail :

$request->response_httpcode; //get request http code
$request->response_headers; // get request headers
$request->response; //get parsed responsed
$request->curl_result; // get curl raw response
$request->errors; // get error if exist
$request->error_number ; get error number if exis

Or you can get all in one array by call responseInArray() ;

$request->responseInArray();

Let me know if something works wrong by send me an email: Orginalireza@gmail.com

thanks

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固