amphp / http Goto Github PK
View Code? Open in Web Editor NEWHTTP primitives which can be shared by servers and clients.
Home Page: https://amphp.org/http
License: MIT License
HTTP primitives which can be shared by servers and clients.
Home Page: https://amphp.org/http
License: MIT License
They shouldn't be exposed as "unknown" attributes, because consuming code will break as soon as support is added, but they should be preserved, so code like this works, even if there are unrecognized attributes.
See amphp/http-client@fa79253 for for the problem.
We could rename the method to something more clear like changeHeaders
. Words like modify or alter may also be possible.
We can't simply remove it because the method has the added value of being atomic.
By the way we could also make the new method accept iterable instead of array.
This commit requires change on http-client
we get the following error after the PR was merged:
Process exited with an uncaught exception: Error thrown in context with message "Class "Amp\Http\Rfc7230" not found" and code "0" in /home/custodio/Development/Enjin/open-platform-core/vendor/amphp/http-client/src/Connection/Http1Connection.php:670; call Amp\Parallel\Context\ContextPanicError::getOriginalTrace() for the stack trace in the context as an array; if the Xdebug extension is enabled, set "xdebug.mode" to "debug" to include the exception stack trace in the context in the exception message
I think it is related to amphp/amp#227. There is a broken link in /docs/asset and composer throws an exception when I try to install the library.
$headers['Content-Length'] = strlen($body)
- always set in int number. All libs! My code is die with v2.0.0-beta.1.
$request = new Request($endpoint, 'POST', $content);
$request->setHeaders($headers);
Currently we're pretty strict about cookie parsing and return an empty cookie array if any cookie contains invalid data. Maybe we should change this, but it might result in security issues depending on the cookie.
I'm primarily using http-client, but almost all query parameter handling is implemented in the parent HttpRequest
class here. It doesn't look like there is any place that the special characters in query parameters are being encoded. Is this intentional? Or does it make sense to provide this option?
Please advise the best way going forward.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.