HTTP client: Simplify HTTP file uploads and submitting forms

Open
#496 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
php
Domain
api

Research direction

No implementation files, tests, or entry points are named. Start by evaluating the client API options described in the issue, including the server-side references (#252, #220, #226) and experimental reactphp/filesystem; done means an agreed API for forms and file uploads with a viable non-blocking filesystem approach.

Written by the indexing model from the issue text.

Description

help wanted new feature

This library should provide better support for HTTP file uploads and submitting forms. Right now, both are supported just fine, but require manually constructing the outgoing HTTP request body. This is relatively easy for simple forms (see https://github.com/reactphp/http#post), but more challenging for forms with file uploads.

Handling file uploads is already supported on the server side (see #252, #220, #226 and others), so adding better support for this also on the client side makes a lot of sense. Implementing this is non-trivial, but doable. The major challenge right now would be evaluating possible API options and once settled, sponsoring/funding for this feature.

On top of this, we would have to consider possible API options for adding file uploads. In particular, non-blocking filesystem access remains challenging (fstat + fopen + fread), see also experimental reactphp/filesystem.

We welcome contributions, reach out if you want to support this project 👍

Dominant language
PHP
Stars
781
Forks
166
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reactphp/http

All issues in reactphp/http

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.