Download the PHP package nimbly/shuttle without Composer

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

Shuttle

Latest Stable Version GitHub Workflow Status Codecov branch License

A simple PSR-18 HTTP client library.

Installation

Features

Not features

A note on PSR-7 and PSR-17

Shuttle makes use of PSR-7 HTTP Message and will default to using nimbly/capsule. You can override this by providing your perferred choice in PSR-7 implementations by passing PSR-17 HTTP Factories instances into the constructor of Shuttle.

Making requests: The easy way

The quickest and easiest way to begin making requests in Shuttle is to use the HTTP method name:

Shuttle has built-in methods to support the major HTTP verbs: get, post, put, patch, delete, head, and options. However, you can make any HTTP verb request using the request method directly.

Handling responses

Responses in Shuttle implement PSR-7 ResponseInterface and as such are streamable resources.

Handling failed requests

Shuttle will throw a RequestException by default if the request failed. This includes things like host name not found, connection timeouts, etc.

Responses with HTTP 4xx or 5xx status codes will not throw an exception and must be handled properly within your business logic.

Making requests: The PSR-7 way

If code reusability and portability is your thing, future proof your code by making requests the PSR-7 way. Remember, PSR-7 stipulates that Request and Response messages be immutable.

Using the sendRequest() method does not apply any base_url or default headers passed into the Shuttle constructor. However, the request is still passed through the middleware chain.

Request bodies

An easy way to submit data with your request is to use the Nimbly\Shuttle\Body\* helper classes. These classes will automatically transform the data, convert to a BufferStream, and set a default Content-Type header on the request.

The request bodies supported are:

To submit a JSON payload with a request:

Middleware

Shuttle supports dual (aka double) pass middleware by implementing MiddlewareInterface. The request and response instance are both available to the middleware and can be manipulated to your specific needs.

You may add as many middleware layers as you need and pass them to the Shuttle constructor. The middleware are executed in the order given.


All versions of shuttle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
psr/http-client Version ^1.0
nimbly/capsule Version ^2.0|^3.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 nimbly/shuttle contains the following files

Loading the files please wait ....