You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
‘/', which returns the message "Welcome to our schedule website".
‘/users’, which returns the list of users
‘/schedules’, which returns the list of schedules
You can use the curl command to make your http queries from the command line. Of course, you can also make your requests in the browser, but doing it from the command line can help you understand how HTTP requests work. 😉
For example, here is how to make requests (here, Express is configured to listen on port 3000) :
You will create the following routes :
‘/', which returns the message "Welcome to our schedule website".
‘/users’, which returns the list of users
‘/schedules’, which returns the list of schedules
You can use the
curl
command to make your http queries from the command line. Of course, you can also make your requests in the browser, but doing it from the command line can help you understand how HTTP requests work. 😉For example, here is how to make requests (here, Express is configured to listen on port 3000) :
$> curl localhost:3000/users
[{"firstname":"James","lastname":"Bond","email":"james.bond@gmail.com","password":"b6b7fb4cad4bc020f76e16889a8e9065cb708d0f8c304a8a3db609b644da9536"},{"firstname":"Tony","lastname":"Stark","email":"starkrulz@gmail.com","password":"a836ebba36776b21dd0f5cdca497bff65c5bdfc8411cfbfe0111f27bde1c1894"},{"firstname":"Ali","lastname":"G","email":"nameisnotborat@gmail.com","password":"3b5fe14857124335bb8832cc602f8edcfa12db42be36b135bef5bca47e3f2b9c”}]
$>
By default,
curl
makes GET requests, but we can change this behavior via options (see Step 4).The text was updated successfully, but these errors were encountered: