devwiki:litestar

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revisionBoth sides next revision
devwiki:litestar [2023/08/29 07:51] – [Concepts] yingdevwiki:litestar [2023/08/29 09:30] – [LiteStar install] ying
Line 8: Line 8:
       * uvicorn       * uvicorn
       * jsbeautifier       * jsbeautifier
 +
 +====== LiteStar syntax ======
 +
 +  * after build a simple api, to interact with that web api, sample code
 +    * get <code python>response = requests.get("http://127.0.0.1:8000/?done=true")</code>
 +    * post <code python>response = requests.post("http://127.0.0.1:8000/",json={"title":"car-washing","done":False})</code>
 +    * put <code python>response = requests.put("http://127.0.0.1:8000/profiting", json={"title":"profiting2","done":True}</code>
 +    * read <code>data = response.json()</code>
 +
 +  * note: 
 +    * json true is "true"
 +    * python true is "True"
 +    * http true is ok with "true" or "True"
  
 ====== Concepts ====== ====== Concepts ======
  • devwiki/litestar.txt
  • Last modified: 2023/08/29 09:31
  • by ying