S
S
Samarkand2016-12-04 04:53:03
PHP
Samarkand, 2016-12-04 04:53:03

WooCommerce REST API PUT requests work for anyone?

GET and POST work but PUT is "The oauth_consumer_key parameter was lost".
Debugging showed that when I make a PUT request, all the parameters are in the REQUEST_URI, but the $_GET array is empty and $_SERVER['REQUEST_METHOD'] is still "GET", not "PUT".
WooCommerce looks for parameters in the $_GET array and doesn't find them.
Apache server, PHP 5.5.20.
If PUT requests work for you, tell us how your server is configured, what version of PHP and Apache?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nazar Mokrinsky, 2016-12-04
@Samarkand

Parameters from the URL will get into $_GET, but if you send data in the request body, then you need to read php://input and, depending on the data format, parse them yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question