0
I’m doing some studies with React, and for that I’m pulling a JSON from Restapi Wordpress.
When I put something like fetch("https://pulsemaker.com.br/wp-json/wp/v2/posts/179")
It works just fine, but when I pass Querys like fetch("https://pulsemaker.com.br/wp-json/wp/v2/posts/?slug=10-projetos-para-fazer-com-arduino")
he doesn’t pull the dice.
Post the code. Without code we can’t help you.
– Diego Souza
I noticed that in the URL with filters has a
array
surrounding the object and when there is no filter is the direct object. You may have to make a small change to your code.– Diego Souza
is an array yes, but I did some tests and it made no difference the array, what I noticed is that the query generates the error (think.. rs)
– Rodrigo Godoy
But console.log shows some error?
– Diego Souza
Does not show, shows the error in the browser even though it is Typeerror: Cannot read Property 'rendered' of Undefined
– Rodrigo Godoy