Skip to content

Commit 0632748

Browse files
authored
Update README.md
1 parent 54f3ea8 commit 0632748

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

vue-5-dynamic-data/README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,42 @@
1+
2+
## Intro
3+
4+
From the video [Vue Tutorial #5 - AJAX data and Lifecycle Methods](https://youtu.be/inJDWcHmsss) you could notice there is REST service at `http://rest.learncode.academy/api/vue-5/friends`
5+
6+
Infact "vue-5" is only user name...
7+
8+
The common link is `http://rest.learncode.academy/api/`**{username}**`/friends`
9+
110
## Check if data exists
211

312
It's possible that data has been deleted before you run an example and see this tutorial.
413
Please check the data:
514

6-
Visit [http://rest.learncode.academy/api/vue-5/friends](http://rest.learncode.academy/api/vue-5/friends) to see it.
15+
Visit one of the link below to see the data:
16+
17+
[http://rest.learncode.academy/api/vue-5/friends](http://rest.learncode.academy/api/vue-5/friends);
18+
19+
[http://rest.learncode.academy/api/john/friends](http://rest.learncode.academy/api/john/friends);
20+
21+
[http://rest.learncode.academy/api/bobby/friends](http://rest.learncode.academy/api/bobby/friends);
22+
23+
[http://rest.learncode.academy/api/someuser/friends](http://rest.learncode.academy/api/someuser/friends);
24+
25+
etc.
26+
727

828
If data isn't there, move to the next chapter and create it!
929

1030
## Add data via curl
1131

1232
Open console and run commands:
1333

14-
`curl -H "Content-Type:application/json" -X POST -d '{"name":"Will"}' http://rest.learncode.academy/api/vue-5/friends`
34+
`curl -H "Content-Type:application/json" -X POST -d '{"name":"Will"}' http://rest.learncode.academy/api/someuser/friends`
35+
36+
`curl -H "Content-Type:application/json" -X POST -d '{"name":"John"}' http://rest.learncode.academy/api/someuser/friends`
1537

16-
`curl -H "Content-Type:application/json" -X POST -d '{"name":"John"}' http://rest.learncode.academy/api/vue-5/friends`
38+
`curl -H "Content-Type:application/json" -X POST -d '{"name":"Bill"}' http://rest.learncode.academy/api/someuser/friends`
1739

18-
`curl -H "Content-Type:application/json" -X POST -d '{"name":"Bill"}' http://rest.learncode.academy/api/vue-5/friends`
40+
Then visit [http://rest.learncode.academy/api/someuser/friends](http://rest.learncode.academy/api/someuser/friends) and ensure the data has been added.
1941

20-
Then visit [http://rest.learncode.academy/api/vue-5/friends](http://rest.learncode.academy/api/vue-5/friends) and ensure the data has been added.
42+
NOTE! Use `http://rest.learncode.academy/api/someuser/friends` in you main.js

0 commit comments

Comments
 (0)