Download the PHP package kriswallsmith/buzz without Composer

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

Buzz - Scripted HTTP browser

![Build Status](https://github.com/kriswallsmith/Buzz/workflows/Tests/badge.svg) ![BC Check](https://github.com/kriswallsmith/Buzz/workflows/BC%20Check/badge.svg) [![Latest Version](https://img.shields.io/github/release/kriswallsmith/Buzz.svg?style=flat-square)](https://github.com/kriswallsmith/Buzz/releases) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/kriswallsmith/Buzz.svg?style=flat-square)](https://scrutinizer-ci.com/g/kriswallsmith/Buzz) [![Quality Score](https://img.shields.io/scrutinizer/g/kriswallsmith/Buzz.svg?style=flat-square)](https://scrutinizer-ci.com/g/kriswallsmith/Buzz) [![Total Downloads](https://img.shields.io/packagist/dt/kriswallsmith/buzz.svg?style=flat-square)](https://packagist.org/packages/kriswallsmith/buzz) [![Monthly Downloads](https://img.shields.io/packagist/dm/kriswallsmith/buzz.svg?style=flat-square)](https://packagist.org/packages/kriswallsmith/buzz)

Buzz is a lightweight (<1000 lines of code) PHP 7.1 library for issuing HTTP requests. The library includes three clients: FileGetContents, Curl and MultiCurl. The MultiCurl supports batch requests and HTTP2 server push.

Installation

Install by running:

You do also need to install a PSR-17 request/response factory. Buzz uses that factory to create PSR-7 requests and responses. Install one from this list.

Example:

Usage

This page will just show you the basics, please read the full documentation.

You can also use the low-level HTTP classes directly.

Note

The two new Psr17ResponseFactory() and new Psr17RequestFactory() are placeholders for whatever PSR-17 factory you choose. If you use nyholm/psr7 then the example above would start like:

HTTP2 server push

Buzz MultiCurl client support HTTP2 server push.

Since the two other requests was pushed, we spend no time fetching those.

You can configure what request you want to accept as pushed with the push_function_callback option.

The Idea of Buzz

Buzz was created by Kris Wallsmith back in 2010. The project grown very popular over the years with more than 7 million downloads.

Since August 2017 Tobias Nyholm is maintaining this library. The idea of Buzz will still be the same, we should have a simple API and mimic browser behavior for easy testing. We should not reinvent the wheel and we should not be as powerful and flexible as other clients (ie Guzzle). We do, however, take performance very seriously.

We do love PSRs and this is a wish list of what PSR we would like to support:

The goal

Since the release of 1.0 Buzz has reached its goal of being a lightweight client that covers 90% of all use cases. There are no plans to actively develop new features or change the existing API. There are alternatives for people that wants an more actively maintained HTTP clients. One that is particularly popular and got a big community behind it is the
Symfony HTTP Client.

Contribute

Buzz is great because it is small, simple and yet flexible. We are always happy to receive bug reports and bug fixes. We are also looking forward to review a pull request with a new middleware, especially if the middleware covers a common use case.

We will probably not accept any configuration option or feature to any of the clients or the Browser.

Backwards Compatibility Promise

We take backwards compatibility very seriously as you should do with any open source project. We strictly follow Semver. Please note that Semver works a bit different prior version 1.0.0. Minor versions prior 1.0.0 are allow to break backwards compatibility.

Being greatly inspired by Symfony's bc promise, we have adopted their method of deprecating classes, interfaces and functions.

Running the tests

There are 2 kinds of tests for this library; unit tests and integration tests. They can be run separably by:

The integration tests makes real HTTP requests to a webserver. There are two different webservers used by our integration tests. A real Nginx server and PHP's built in webserver. The tests that runs with PHP's webserver are provided by php-http/client-integration-tests.

To start the server, open terminal A and run:

The other type of integration tests are using Nginx. We use Docker to start the Nginx server.

You are now ready to run the integration tests

Test Server Push

To use HTTP/2 server push you need to run the very latest PHP version. PHP also need to use cUrl > 7.61.1 and be compiled with libnghttp2. You can use docker:


All versions of buzz with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1 || ^8.0
psr/http-message Version ^1.0
psr/http-client Version ^1.0
php-http/httplug Version ^1.1 || ^2.0
symfony/options-resolver Version ^3.4 || ^4.0 || ^5.0 || ^6.0
psr/http-factory Version ^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 kriswallsmith/buzz contains the following files

Loading the files please wait ....