Download the PHP package sndsgd/http without Composer

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

sndsgd/http

Latest Version Software License Build Status Coverage Status Total Downloads

Improved HTTP for PHP.

Requirements

You need PHP >= 7.1 to use this library, however, the latest stable version of PHP is recommended.

Install

Install sndsgd/http using Composer.

Usage

This library aims to improve how PHP handles HTTP requests, mainly by streamlining the the process of working with request parameters.

Improved Request Parameter Decoders

To experiment with the decoders, you can use PHP's built in webserver with the script located in bin/request-demo.php.

Now you will be able to make requests to http://localhost:8000 using any HTTP client. In the examples below, we'll be using httpie. To dump information about the request that is being made, simply append -v to any of the commands below.

Query String Decoder

In many query parameter implementations, you do not need to use brackets to indicate multiple values, but with PHP you do. For compatibility with the built in PHP decoder, you can continue to use brackets.

Result:

Request Body Decoder

The built in body decoder for PHP only handles multipart/form-data and application/x-www-form-urlencoded content types for POST requests. This library acts as a polyfill to add application/json to that list, and to allow for decoding the request body for any request method. By default, POST requests will be processed by the built in PHP decoder, however, you can disable that functionality by setting enable_post_data_reading = Off in your php.ini.

The built in decoder will not decode the body of this urlencoded PATCH request

Result:

Uploaded Files

Instead of using $_FILES, with sndsgd/http uploaded files are included with the other parameters of the request body as objects.

Result:


All versions of http with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
sndsgd/util Version >=1.1.0
sndsgd/error Version ~0.0.4
sndsgd/form Version >=0.1.3
sndsgd/fs Version >=0.4.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 sndsgd/http contains the following files

Loading the files please wait ....