承接 amphp/http-server-form-parser 相关项目开发

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

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

amphp/http-server-form-parser

最新稳定版本:v2.0.0

Composer 安装命令:

composer require amphp/http-server-form-parser

包简介

An HTTP server plugin that simplifies form data handling. Effortlessly parse incoming form submissions and extracting its data.

README 文档

README

This package is an add-on to amphp/http-server, which allows parsing request bodies as forms in either x-www-form-urlencoded or multipart/form-data format.

Installation

This package can be installed as a Composer dependency.

composer require amphp/http-server-form-parser

Usage

Basic usage works by calling Form::fromRequest($request), which will buffer the request body and parse it. This method may be called multiple times, so both a middleware and request handler may access the form body.

use Amp\Http\Server\FormParser\Form; use Amp\Http\Server\Request; use Amp\Http\Server\RequestHandler\ClosureRequestHandler; use Amp\Http\Server\Response; use Amp\Http\Status; $requestHandler = new ClosureRequestHandler(function (Request $request) { $form = Form::fromRequest($request); return new Response(Status::OK, [ "content-type" => "text/plain; charset=utf-8" ], $form->getValue("text") ?? "Hello, World!"); });

There's also an advanced streaming parser included, StreamingFormParser, which can be used to stream uploaded files to disk or other locations.

统计信息

  • 总下载量: 83.28k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 18
  • 点击次数: 2
  • 依赖项目数: 15
  • 推荐数: 0

GitHub 信息

  • Stars: 18
  • Watchers: 6
  • Forks: 4
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固