Comments (6)
Have you checked the https://spiral.dev/docs/http-configuration#middleware
Specifically Spiral\Bootloader\Http\JsonPayloadsBootloader
. Sounds like we might need to enable it by the default.
from app.
Also, the documentation includes a full-text search, it will guide you to the proper article. Let me know how we can improve it.
from app.
Thanks for the help. I found it. It definetely doesn't work as I expected, though. Without enabling it, the actual PSR7 request interface has an empty body. Usually this would be the string request data, but its empty.
Using the JSON bootloader makes the input manager work, but the raw request should always contain the request payload, IMO.
This could use its own section in the documentation, or at least make it a sub section under the response. I would be happy to help add it as I become more familiar with its workings.
from app.
Using the JSON bootloader makes the input manager work, but the raw request should always contain the request payload, IMO.
This is weird since we have a proper test for it: https://github.com/spiral/roadrunner/blob/master/tests/http/payload.php
Is it possible that the content is in the request but you must reset the body position (seek)? Have you tried to convert it into the string? The body must be in the request if the middleware can parse it.
This could use its own section in the documentation, or at least make it a sub-section under the response. I would be happy to help add it as I become more familiar with its workings.
We are currently working on completing the documentation and announcing the platform. Any help with the documentation will be appreciated as we have to cover a massive amount of information.
from app.
How are you trying to read the raw body? Check how middleware doing it: https://github.com/spiral/framework/blob/master/src/Http/Middleware/JsonPayloadMiddleware.php#L47
I have a strong feeling that Nyholm getContents()
and __toString()
methods behave differently.
from app.
App build includes this middleware by default now.
from app.
Related Issues (20)
- Describe application structure in README
- gRPC application preset for installer is broken
- Fix psalm issues
- Remove cleanup.sh after installation
- Update spiral framework up to 3.7
- Fatal error: Uncaught Error: Unknown named parameter $exceptionHandler in \src\app.php:22 HOT 1
- RoadRunner 2.12 is downloading instead of 2023.1 HOT 4
- Commands for quick setup of application
- More advanced scheduler
- copy(/E:\work\composer\my-app\installer/Application/Common/resources): Failed to open stream: No such file or directory
- Fix Docker Compose Configuration for Temporal Infrastructure in Spiral Installer
- Could not install spiral framework on linux HOT 2
- Homepage requires Translator HOT 1
- Problem with tutorial switching from `PostView` to `PostGrid` HOT 4
- gRPC app generates wrong rr.yaml
- Can't install app with cron jobs but without cache HOT 1
- Error env calling at database config setup
- Include DB_* Environment Variables in Default .env / .env.sample HOT 1
- Update temporal container versions. HOT 1
- When project is generated with Temporal support it will fail to start.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app.