Comments (2)
What is the exact request you're doing and the response you're getting? If you're seeing an error like "permission denied for sequence..."
then you need to grant permissions to the SEQUENCE generated by serial
as seen in the Tutorial 1.
from postgrest.
Purely by the tutorial, using secret 01234567012345670123456701234567, running in an emacs shell so using json_pp to print
brucer42@brucer42s-MBP postgrest % curl http://localhost:3000/todos -X POST
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoidG9kb191c2VyIn0.qrlieu5zvSLJcyDFJ_ZoWTbLkDZbVm1LAsdtPKM7J1Y"
-H "Prefer: return=headers-only"
-H "Content-Type: application/json"
-d '{"task": "learn how to auth"}' | json_pp
curl http://localhost:3000/todos -X POST \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoidG9kb191c2VyIn0.qrlieu5zvSLJcyDFJ_ZoWTbLkDZbVm1LAsdtPKM7J1Y" \ -H "Prefer: return=headers-only" \ -H "Content-Type: application/json" \ -d '{"task": "learn how to auth"}' **| json_pp**
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 29 0 0 100 29 0 534 --:--:-- --:--:-- --:--:-- 537
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/bin/json_pp5.30 line 52.
brucer42@brucer42s-MBP postgrest % curl http://localhost:3000/todos -X POST
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoidG9kb191c2VyIn0.qrlieu5zvSLJcyDFJ_ZoWTbLkDZbVm1LAsdtPKM7J1Y"
-H "Prefer: return=representation"
-H "Content-Type: application/json"
-d '{"task": "learn how to auth"}' | json_pp
curl http://localhost:3000/todos -X POST \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoidG9kb191c2VyIn0.qrlieu5zvSLJcyDFJ_ZoWTbLkDZbVm1LAsdtPKM7J1Y" \ -H "Prefer: return=representation" \ -H "Content-Type: application/json" \ -d '{"task": "learn how to auth"}' | json_pp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 90 0 61 100 29 4468 2124 --:--:-- --:--:-- --:--:-- 6923
[
{
"done" : false,
"due" : null,
"id" : 7,
"task" : "learn how to auth"
}
]
brucer42@brucer42s-MBP postgrest %
from postgrest.
Related Issues (20)
- arm builds failing in CI HOT 4
- Cannot nix run PostgREST on aarch64-darwin HOT 2
- Add pool checkout to `Server-Timing` HOT 1
- `600 Operator Error` status code
- The Case of count() : doc not ok HOT 4
- DB_SCHEMAS does not display all schemas in Swagger
- Accept header value shoud be case-insensitive
- Support structured data in PostgreSQL `COMMENT`s HOT 1
- Proper Media Types parser
- Write docs for v12.2.0 minor release
- Update CI runners to macos v14
- www.postgrest.org links to strange site HOT 1
- Row Filter parameter format is displayed as `integer`
- Server port and admin server port can end up with the same value HOT 4
- Cancel query where client connection was terminated HOT 3
- Calculate math with addition, submission or calculated field
- Documentation does not mention that Updates can use the `columns` parameter or `missing=default` preference
- The schema cache load is not retried with exponential backoff
- Clean up arm job when run again HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgrest.