承接 turkevich/php-restful-client 相关项目开发

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

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

turkevich/php-restful-client

Composer 安装命令:

composer require turkevich/php-restful-client

包简介

PHP RESTful Client

README 文档

README

Installation

Installation with Composer

Either run

    php composer.phar require --prefer-dist turkevich/rest-client:"dev-master"

or add in composer.json

    "require": {
            ...
            "turkevich/php-restful-client":"dev-master"
    }

Well done!

Example call GET

    $result = (new Client())->requestParams(Client::GET, $url, $data)->call();

Example call CUSTOM with GET data

    $result = (new Client())->requestParams(Client::CUSTOM, $url, $data)->call();

Example call CUSTOM with POST data

    $result = (new Client())->requestParams(Client::CUSTOM, $url, $data)->usePost()->call();

Example call to url with http auth

    $result = (new Client())->requestParams(Client::POST, $url, $data)->useHttpAuth($username, $password)->call();

Use response content type

    $result = (new Client())->requestParams(Client::PATCH, $url, $data)->useResponseContentType()->call();

Get result in stdClass

    $result = (new Client())->requestParams(Client::PUT, $url, $data)->usePost()->call(true);

Enjoy, guys!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-06-17