node-wpapi icon indicating copy to clipboard operation
node-wpapi copied to clipboard

How can I send a post request in a custom route?

Open simplenotezy opened this issue 6 years ago • 0 comments

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.

simplenotezy avatar Feb 17 '20 13:02 simplenotezy