Download the PHP package api-clients/transport without Composer

On this page you can find all versions of the php package api-clients/transport. 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 transport

API Client Transport for PHP 7.x

Build Status Latest Stable Version Total Downloads Code Coverage License PHP 7 ready

In a nutshell this package is a wrapper around clue/buzz-react adding middleware.

Install

To install via Composer, use the command below, it will automatically detect the latest version and bind it with ^.

Usage

Creating the client can be done using the factory:

Next you can make PSR-7 request:

Middleware

Middlewares are passed into the client with the options argument. In this example the api-clients/middleware-delay is used. Adding middlewares to the client is simple, add an array to $options with Options::MIDDLEWARE as index cosisting of middleware class names. Optionally you can pass options for the middleware through the $options array. Simply add a new array inside the array with the middlware class name as index and pass the desired options into it.

Middleware options can be changed per request, this specific request only will have a delay of 5 seconds instead of the default 3:

Options

Options::DNS

DNS server to use resolving hostnames, defaults to 8.8.8.8.

Options::SCHEMA

Schema part of the URI, defaults to https.

Options::HOST

Host part of the URI, required.

Options::PORT

Port part of the URI, optional.

Options::PATH

Path part of the URI, defaults to /.

Options::HEADERS

Key value array with headers, defaults to [].

Options::MIDDLEWARE

Array with middleware class names, for example [MiddlewareOne::class, MiddlewareTwo::class], defaults to [].

Options::DEFAULT_REQUEST_OPTIONS

Set of default request options, mainly useful for middlewares needed for all requests, defaults to [].

License

The MIT License (MIT)

Copyright (c) 2017 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


All versions of transport with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
api-clients/middleware Version ^4.0
api-clients/rx Version ^2.0
clue/buzz-react Version ^2.0 || ^1.4
react/event-loop Version ^1.0 || ^0.5 || ^0.4
react/http-client Version ^0.4.17 || ^0.5
react/promise-stream Version ^1.0 || ^0.1.0
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 api-clients/transport contains the following files

Loading the files please wait ....