From 311291ae58fd6baae47fff7b1efd8c47c102c25c Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Thu, 15 Dec 2011 08:56:57 +0100 Subject: Update API documentation and simplify usage of reindent option. --- extras/appengine/sqlformat/templates/api.html | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'extras/appengine/sqlformat/templates/api.html') 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 @@

Using the API for this application is pretty simple. Just send a - POST request to + request to

http://sqlformat.appspot.com/format/ @@ -15,9 +15,10 @@

Options

- The POST request accepts various options to control - formatting. Only the data option is required. All others - are optional. + The server accepts various options to control formatting. Only + the data option is required. All others are optional.
+ Either use GET and pack the options in the query string + or POST and submit your parameters as form data.

@@ -49,4 +50,15 @@ Download sqlformat_example_client.py

+

+ And another example using curl and a GET request: +

+
+$ curl "http://localhost:8080/format?keyword_case=upper&reindent=true&data=select%20*%20from%20foo;"
+SELECT *
+FROM foo;
+$
+
+ + {% endblock %} -- cgit v1.2.1