Skip to content

POST header Prefer: return=headers-only not returning LOCATION information #3451

Answered by brucer42
brucer42 asked this question in Q&A
Discussion options

You must be logged in to vote

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: appl…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@laurenceisla
Comment options

@brucer42
Comment options

Answer selected by brucer42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3445 on April 24, 2024 23:36.