diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2011-12-15 08:56:57 +0100 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2011-12-15 08:56:57 +0100 |
| commit | 311291ae58fd6baae47fff7b1efd8c47c102c25c (patch) | |
| tree | 17ad2a2a80707c435e53a2c8616b2386d480a29b /extras/appengine/sqlformat/templates | |
| parent | 8953118a6dc4618ff8eb44a7cd0ff427de198c2f (diff) | |
| download | sqlparse-311291ae58fd6baae47fff7b1efd8c47c102c25c.tar.gz | |
Update API documentation and simplify usage of reindent option.
Diffstat (limited to 'extras/appengine/sqlformat/templates')
| -rw-r--r-- | extras/appengine/sqlformat/templates/api.html | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/extras/appengine/sqlformat/templates/api.html b/extras/appengine/sqlformat/templates/api.html index 79bf118..ebfd83a 100644 --- a/extras/appengine/sqlformat/templates/api.html +++ b/extras/appengine/sqlformat/templates/api.html @@ -7,7 +7,7 @@ <p> Using the API for this application is pretty simple. Just send a - <code>POST</code> request to + request to </p> <p> <code>http://sqlformat.appspot.com/format/</code> @@ -15,9 +15,10 @@ <h2>Options</h2> <p> - The <code>POST</code> request accepts various options to control - formatting. Only the <em>data</em> option is required. All others - are optional. + The server accepts various options to control formatting. Only + the <em>data</em> option is required. All others are optional.<br /> + Either use <code>GET</code> and pack the options in the query string + or <code>POST</code> and submit your parameters as form data. </p> <dl> @@ -49,4 +50,15 @@ <a href="/static/sqlformat_client_example.py">Download sqlformat_example_client.py</a> </p> +<p> + And another example using curl and a <code>GET</code> request: +</p> +<div class="highlight example"><pre> +$ curl "http://localhost:8080/format<b>?</b>keyword_case=upper<b>&</b>reindent=true<b>&</b>data=select%20*%20from%20foo;" +SELECT * +FROM foo; +$ +</pre></div> + + {% endblock %} |
