2017 © Pedro Peláez
 

library restful_client

image

jsnlib/restful_client

  • Friday, March 30, 2018
  • by fdjkgh580
  • Repository
  • 1 Watchers
  • 1 Stars
  • 38 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 3 % Grown

The README.md

restful_client

安裝

composer require jsnlib/restful_client, (*1)

使用方式

require_once '../vendor/autoload.php';

$client = new \Jsnlib\Restful\Client(
[
    'base_uri' => 'http://dev.api.westamps.com/v1/'
]);
$result = $client->get('method', 
[
    'Say' => 'Hello World'
]);
$result = $client->post('method', 
[
    'Say' => 'Hello World'
]);
$result = $client->put('method', 
[
    'Say' => 'Hello World'
]);
$result = $client->patch('method', 
[
    'Say' => 'Hello World'
]);
$result = $client->delete('method', 
[
    'Say' => 'Hello World'
]);

POST

文件上傳,如 video 有多筆, (*2)

$result = $client->post('method', 
[
    [
        'name'     => 'video[]',
        'contents' => fopen('demo/demo.mp4', 'r')
    ],
], true);

The Versions

30/03 2018

dev-master

9999999-dev https://github.com/fdjkgh580/restful_client

  Sources   Download

MIT

The Requires

 

library helper restful client codeigniter

30/03 2018

1.1.0

1.1.0.0 https://github.com/fdjkgh580/restful_client

  Sources   Download

MIT

The Requires

 

helper restful client codeigniter