Download the PHP package jalle19/simple-json-rpc-client without Composer

On this page you can find all versions of the php package jalle19/simple-json-rpc-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package simple-json-rpc-client

Build Status Scrutinizer Code Quality Coverage Status

simple-json-rpc-client

Simple yet powerful JSON-RPC client which fully implements the JSON-RPC 2.0 specifications. It provides an interface for creating custom clients and comes with a default implementation which sends requests over HTTP using POST. Being standard-compliant it supports standard requests, notifications as well as batch requests.

Requirements

PHP 5.4 is required.

Installation

Install using Composer (the package is published on Packagist). Install with --no-dev if you don't want or need the ability to run the test suite.

Usage

Standard requests

Notifications

Batch requests

Exception handling

All exceptions derive from the base class BaseException. If you don't want to handle specific exceptions differently from others you can simply catch BaseException like in the examples above. Here's an example which illustrates the exception hierarchy:

Error handling

Some JSON-RPC servers may return a "data" property in their response error. This property may contain valuable information as to the nature of the error. The special ResponseErrorException is thrown whenever a response indicates an error. The exception has a getData() method which returns an object representation of the error data.

Flags

The client constructor takes a set of flags as the forth parameter. These flags can be used to alter the behavior of the client, mostly useful for working with buggy servers. For example, the FLAG_ATTEMPT_UTF8_RECOVERY flag will cause the Response class to attempt to avoid "Malformed UTF-8 in response" errors by re-encoding the raw response as UTF-8 before passing it to json_decode(). This is only done if the raw response is determined not to be valid UTF-8.

Test suite

Run vendor/bin/phpunit in the project root folder to run the unit tests. The test suite will launch a mock JSON-RPC server on localhost:8585 using PHP's internal web server. If this port is not available on your system you can change it by editing phpunit.xml.

License

This code is licensed under the New BSD License


All versions of simple-json-rpc-client with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
zendframework/zend-http Version 2.2.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jalle19/simple-json-rpc-client contains the following files

Loading the files please wait ....