File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -197,21 +197,21 @@ If we're interacting with the API programmatically we need to explicitly provide
197197
198198If we try to create a snippet without authenticating, we'll get an error:
199199
200- http POST http://127.0.0.1:8000/snippets/ code="print 123"
200+ http POST http://127.0.0.1:8000/snippets/ code="print( 123) "
201201
202202 {
203203 "detail": "Authentication credentials were not provided."
204204 }
205205
206206We can make a successful request by including the username and password of one of the users we created earlier.
207207
208- http -a admin:password123 POST http://127.0.0.1:8000/snippets/ code="print 789"
208+ http -a admin:password123 POST http://127.0.0.1:8000/snippets/ code="print( 789) "
209209
210210 {
211211 "id": 1,
212212 "owner": "admin",
213213 "title": "foo",
214- "code": "print 789",
214+ "code": "print( 789) ",
215215 "linenos": false,
216216 "language": "python",
217217 "style": "friendly"
You can’t perform that action at this time.
0 commit comments