开发者

How to create simple post/get API making simple calling to GAE database using Google App Engine?

开发者 https://www.devze.com 2023-01-04 06:57 出处:网络
How to create simple post/get API making simple calling to GAE database using Google App Engine? Like create DB item retrive and开发者_JAVA百科 delete. How to acsess it after you created it?I am assum

How to create simple post/get API making simple calling to GAE database using Google App Engine? Like create DB item retrive and开发者_JAVA百科 delete. How to acsess it after you created it?


I am assuming that you are using Java as the language on the app engine. You will have to make a RESTful application using servlets which defines certain CRUD functionalities. Make servlets for create, update, delete and select/query.

for example:

http://app.appspot.com/create?name=tablename

http://app.appspot.com/query?table=tablename&id=200

The create servlet will have to create a new Model on the datastore. The query servlet will take in an ID and return back the row. Might I also suggest using JSON as the dataformat for receiving data at the client side.

0

精彩评论

暂无评论...
验证码 换一张
取 消