我试图在我的 Postgresql 数据库中插入数据,但我失败了。
所以基本上我可以用下面的查询选择数据;
curl 10.127.18.18:3001/mytable
我可以通过此请求获取所有行。
我尝试了以下命令的很多组合,但都失败了。如何使用 postgREST 插入基本数据?
“ mytable ”表有 2 列,“ user_id ”和“ username ”;
curl POST 10.127.18.18:3001/mytable { "user_id": 3333, "username": testuser }
curl -X POST 10.127.18.18:3001/mytable HTTP/1.1 { "user_id": "3333", "username": "testuser" }
谢谢!