16 lines
419 B
Bash
16 lines
419 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
|
||
|
|
# this should fail as no token is provided
|
||
|
|
# user is not authenticated
|
||
|
|
# no token has been granted
|
||
|
|
|
||
|
|
URL='http://127.0.0.1:8000/api/text-widgets'
|
||
|
|
|
||
|
|
curl -X POST \
|
||
|
|
-H "Accept: application/json" \
|
||
|
|
-H "Content-Type: application/json" \
|
||
|
|
-d '{
|
||
|
|
"title": "Yet Another New Entry Title",
|
||
|
|
"content": "This is the content yet again of the new entry."
|
||
|
|
}' \
|
||
|
|
$URL
|