before I was enabled to get data from my website using Wordpress API V2. I access it will return the post with default number per game is 10. then after we add more text on the post, it's seams return nothing, when I try to hit with the postman, it's blank, with body content-length is 0.
I have read so much article and documentation, some post said it because Wordpress did a substring while the return and it will return null if the char more than 2000 char.
Before I can get the data from the postman, there is anybody faces the same issue?
Thank you, Best Regards.
before I was enabled to get data from my website using Wordpress API V2. I access https://sitename.com/wp-json/wp/v2/posts it will return the post with default number per game is 10. then after we add more text on the post, it's seams return nothing, when I try to hit with the postman, it's blank, with body content-length is 0.
I have read so much article and documentation, some post said it because Wordpress did a substring while the return and it will return null if the char more than 2000 char.
Before I can get the data from the postman, there is anybody faces the same issue?
Thank you, Best Regards.
the documentation that said there is the limit I got from this Post
WP REST API returns blank response if post is too long
and just I just solve it So How to fix this? I made a custom API, and convert my data to JSON using json_encode by using the option.
Solution $json = json_encode($your_array, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE)
return $json
by using that solution, you no need to echo the data.
Thanks for helping.