承接 fast-forward/http 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fast-forward/http

最新稳定版本:v1.1.0

Composer 安装命令:

composer require fast-forward/http

包简介

Fast Forward HTTP is a toolkit for building HTTP applications in PHP.

README 文档

README

PHP Version Composer Package Tests Coverage Docs License GitHub Sponsors

PSR-7 PSR-11 PSR-17 PSR-18

Fast Forward HTTP is the aggregate HTTP package of the Fast Forward ecosystem.

It is designed for developers who want a practical starting point for HTTP work without wiring each piece manually. Install one package, register one provider, and you get the default Fast Forward HTTP stack in your container.

What You Get

  • PSR-17 factories for requests, responses, server requests, streams, uploaded files, and URIs
  • A PSR-18 HTTP client backed by Symfony HttpClient
  • A ServerRequestInterface created from PHP globals
  • Fast Forward convenience factories for JSON, HTML, text, redirect, empty responses, and payload streams
  • One aggregate HttpServiceProvider that wires the stack together

Installation

composer require fast-forward/http

Quickstart

<?php

declare(strict_types=1);

use FastForward\Http\Message\Factory\ResponseFactoryInterface;
use FastForward\Http\ServiceProvider\HttpServiceProvider;
use function FastForward\Container\container;

$container = container(new HttpServiceProvider());

$responseFactory = $container->get(ResponseFactoryInterface::class);

$response = $responseFactory->createResponseFromPayload([
    'message' => 'Hello, Fast Forward HTTP!',
    'ok' => true,
]);

echo $response->getHeaderLine('Content-Type');
// application/json; charset=utf-8

Main Services

Identifier Default concrete service Purpose
Psr\Http\Message\RequestFactoryInterface Nyholm\Psr7\Factory\Psr17Factory Create outbound requests
Psr\Http\Message\ResponseFactoryInterface Nyholm\Psr7\Factory\Psr17Factory Create plain PSR-17 responses
FastForward\Http\Message\Factory\ResponseFactoryInterface FastForward\Http\Message\Factory\ResponseFactory Create JSON, HTML, text, redirect, and empty responses
FastForward\Http\Message\Factory\StreamFactoryInterface FastForward\Http\Message\Factory\StreamFactory Create payload-aware JSON streams
Psr\Http\Message\ServerRequestInterface ServerRequestCreator::fromGlobals() result Access the current incoming request
Psr\Http\Client\ClientInterface Symfony\Component\HttpClient\Psr18Client Send outbound HTTP requests

Documentation

See the documentation sources in docs/ for:

  • installation and quickstart
  • retrieving services from the container
  • responses, streams, and server requests
  • advanced customization and aliasing
  • aggregated services and compatibility notes

Related Packages

License

Fast Forward HTTP is licensed under the MIT license.

统计信息

  • 总下载量: 309
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固