Download the PHP package velt/http without Composer

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

Velt HTTP

velt/http is the web transport layer for Velt applications. It provides requests, responses, JSON responses, routing, controller dispatch, middleware pipelines, response normalization, sessions and CSRF foundations while relying on velt/kernel for application services.

Status: alpha. Routing and dispatch are functional; production hardening for proxies, uploads, streaming, rate limiting and security policy remains tracked in the repository milestone.

Installation

Requirements: PHP 8.2+ and velt/kernel.

Register the HTTP layer

The service provider connects HTTP services to the application container without moving HTTP behavior into the kernel.

Define routes

Routes support parameter matching and route-specific middleware. A route under /api is treated as an API route by the current response normalization logic.

Request API

Requests normalize method, path, query/input collections and headers. Application validation must still enforce domain rules and reject unexpected values.

Responses

ResponseInterface exposes status, headers, body and send behavior. ResponseFactory converts controller results and exceptions into consistent web or API responses. Controllers can return response objects, renderable values, JSON-compatible values or supported primitives.

Controller dispatch

The dispatcher matches the route, resolves controller instances through the container, passes route parameters and sends the result through the response factory.

Middleware

Pipeline executes middleware in declared order and terminates at the route handler. Middleware should return a response and avoid hidden global state.

The dispatcher can handle CORS preflight requests. Origins are denied by default and must be configured explicitly:

An allowed OPTIONS request returns 204 with explicit Access-Control-Allow-* headers. Wildcard origins are not added automatically when credentials are enabled.

Sessions and CSRF

SessionStoreInterface supports get, set, has and remove. PhpSessionStore adapts PHP sessions. CsrfTokenManager creates, renders and validates CSRF tokens:

Production applications must configure secure cookie attributes, HTTPS, session rotation and storage appropriate for their deployment. PhpSessionStore::configureSecureDefaults() enables Secure, HttpOnly and SameSite=Lax defaults. CSRF protects state-changing browser requests; API authentication requires a separate policy.

Error behavior

HttpException carries an HTTP status code. The response factory distinguishes API and web error formats. In production, diagnostics must never disclose stack traces, source paths, request secrets or database credentials.

Recommended API envelope:

Front controller example

Current production checklist

The current hardening layer provides:

Before Velt HTTP is considered stable, the project is completing:

The native Android bridge does not use HTTP internally. HTTP remains a web and development-preview adapter, not a substitute for JNI.

Testing

The suite covers request accessors, responses, routing, dispatch, middleware pipeline and CSRF behavior. New features must include success and failure cases plus security-focused regression tests.

Contributing

Keep transport behavior in this repository and application/domain behavior outside it. Public changes require updated examples, stable error contracts and compatibility evidence with the kernel and skeleton.

License

MIT


All versions of http with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
velt/kernel Version ^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 velt/http contains the following files

Loading the files please wait ...