node-wpapi
node-wpapi copied to clipboard
How can I send a post request in a custom route?
How do I send a post request using a custom route? It's not documented anywhere.
I have tried like this:
const request = this.$wp.myCustomRequest().create(postData); // postData is object with data
It does indeed send a POST request, but the $_POST variables are not present.