承接 vitalik74/simple-request-json 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

vitalik74/simple-request-json

Composer 安装命令:

composer require vitalik74/simple-request-json

包简介

Simple class implement request with JSON body.

README 文档

README

REQUIREMENTS

The minimum requirement by this application template that your Web server supports PHP 5.4.0.

INSTALLATION

Install via Composer

If you do not have Composer, you may install it by following the instructions at getcomposer.org.

You can then install this widget. Put in your composer.json in require case:

"vitalik74/simple-request-json": "*"

And run command "composer update".

USE

Data request run from Curl in default. If Curl not installed in system data request run from file_get_contents function.

Example, how to use:

$response = (new Request(['url' => 'Url ', 'postData' => 'post data']))->getResponse();

Or

$response = new Request(['url' => 'Url ', 'postData' => 'post data']);
$response = $response->getResponse();

Or

$response = new Request();
$response->url = 'url';
$response->postData = 'post data';
$response->method = 'GET';// default in POST
$response = $response->getResponse();

Public property

$postData - Post data to put in server.

$url - Url from server.

$method - POST or GET method.

$toArray - Convert response from server to array with json_decode function

$noData - If you no set data set this property to true

$sendToJsonFormat - Send to server with json format (add special header)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固