We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For better handling in some programming we detect Header Content-type json, I did add header('Content-Type: application/json'); but still don't work
The text was updated successfully, but these errors were encountered:
For example. use Workerman/Protocols/Http/Response; // ..... return new Response(200, [“ Content-Type” => “ application/json”], json_encode($data));
Sorry, something went wrong.
Ok, Great its work
use Workerman\Protocols\Http\Response; new Response(200, ["Content-Type" => "application/json"], json_encode($data));
but it's make performance little bit slower when I'm using wrk
The performance is the same, but you have to json_encode() the data.
json_encode()
in my case, i parsed the data by using await response.text() rather than await response.json() await response.text() works fine.
await response.text()
await response.json()
No branches or pull requests
For better handling in some programming we detect Header Content-type json,
I did add header('Content-Type: application/json');
but still don't work
The text was updated successfully, but these errors were encountered: