Created
September 12, 2018 17:36
-
-
Save MouseZero/d1ca35db120f6c7eab1d21c8f13cae0e to your computer and use it in GitHub Desktop.
Curl request with JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curlData=' | |
{ | |
"set": { | |
"uuid": "59097720-9676-11e8-bccf-5dc6be09647d", | |
"name": "Test Set", | |
"cards": [ | |
{ | |
"question": "Test question 1", | |
"answer": "Test answer 1", | |
"isMarkdown": true, | |
"attempt": { | |
"daysTellQuiz": 0, | |
"lastDate": "2018-08-02T17:06:21.567Z", | |
"lastStatus": "new" | |
}, | |
"id": "613068f0-9676-11e8-bccf-5dc6be09647d" | |
}, | |
{ | |
"question": "Another test question", | |
"answer": "another answer", | |
"isMarkdown": false, | |
"attempt": { | |
"daysTellQuiz": 0, | |
"lastDate": "2018-08-02T17:06:36.040Z", | |
"lastStatus": "new" | |
}, | |
"id": "69d0f790-9676-11e8-bccf-5dc6be09647d" | |
} | |
] | |
} | |
}' | |
echo $curlData | curl -0 -v -X POST \ | |
http://localhost:4444/sync \ | |
-H "Authorization: Bearer $jwt" \ | |
-H 'Content-Type: application/json' \ | |
-d @- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment