HackerTrans
TopNewTrendsCommentsPastAskShowJobs

tiempie

no profile record

Submissions

Show HN: Mocking APIs by just posting jsons to endpoints

github.com
2 points·by tiempie·9 माह पहले·0 comments

Self-hosted API for CRUD-ing JSON data (for easy data storage)

github.com
3 points·by tiempie·10 माह पहले·1 comments

comments

tiempie
·9 माह पहले·discuss
Nice. So sending {"username": "tom"} to /api/test/users will create > test.json with {"users": {"username": "tom"}} ?
tiempie
·10 माह पहले·discuss
Note, the API is written in GO and based on your JSON structure. So the example below is for CRUD-ing [key1][key2] in file.json. The value (which can be anything) is then added to the body of the request. Moreover, there are helper functions for appending and incrementing values. Great for personal projects!

  DELETE/PUT/GET: /api/file/key1/key2/...