Re: [closure-compiler-discuss] WebAPI seems not available

28 views
Skip to first unread message

Ben Lickly

unread,
May 16, 2013, 1:34:52 PM5/16/13
to closure-comp...@googlegroups.com
Your request works for me:

$ curl "http://closure-compiler.appspot.com/compile" -d "output_format=json&output_info=compiled_code&output_info=warnings&output_info=errors&output_info=statistics&compilation_level=SIMPLE_OPTIMIZATIONS&warning_level=default&output_file_name=default.js&js_code=%2F%2F%20ADD%20YOUR%20CODE%20HERE%0Afunction%20hello(name)%20%7B%0Aalert('Hello%2C%20'%20%2B%20name)%3B%0A%7D%0Ahello('New%20user')%3B"

{"compiledCode":"function hello(a){alert(\"Hello, \"+a)}hello(\"New user\");","statistics":{"originalSize":90,"originalGzipSize":100,"compressedSize":55,"compressedGzipSize":68,"compileTime":0},"outputFilePath":"/code/jsca752286874097e7ef44c9e029737eb83/default.js"}




On Wed, May 15, 2013 at 2:46 AM, <tomota...@gmail.com> wrote:
Hi All,

I am trying to use ClosureCompiler WebAPI from my program to minify JavaScript which is dynamically generated inside program.

But ClosureCompiler WebAPI always returns error code 13: "No output information to produce, yet compilation was requested."
I gave WebAPI the output_info param with value 'compiled_code' though.

To make sure, I tried with sample parameter generated by ClosureCompiler UI page: 

The params are following:
output_format=json
&output_info=compiled_code
&output_info=warnings
&output_info=errors
&output_info=statistics
&compilation_level=SIMPLE_OPTIMIZATIONS
&warning_level=default
&output_file_name=default.js
&js_code=%2F%2F%20ADD%20YOUR%20CODE%20HERE%0Afunction%20hello(name)%20%7B%0Aalert('Hello%2C%20'%20%2B%20name)%3B%0A%7D%0Ahello('New%20user')%3B

(of course I remove all white spaces when I send from my program.)

Am I doing something wrong?
Is there something wrong with WebAPI?

Thank you.

--
 
---
You received this message because you are subscribed to the Google Groups "Closure Compiler Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to closure-compiler-d...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages