I’m using the Google Closure Compiler RESTFul API with WordPress.
The request is created using wp_remote_post()
and so far everything went okay.
What I want to know is how to get the API to not only return the compiled code, but also the warnings, errors and statistics.
Supplying 'output_info' => array( 'compiled_code', 'warnings', 'errors', 'statistics' )
in the body
parameter seems not to work and the API returns errors. Any ideas?
Thank you very much!
Just looked around and found out that Closure Compiler accepts
output_info
parameter multiple times. This is not possible with theWP_Http
API without some modifications.So I looked at the source of
WP_Http
and did the following, now it’s working 🙂