cmda-bt / be-course-17-18

🎓 Backend · 2017-2018 · Curriculum and Syllabus 💾
Other
47 stars 19 forks source link

Transfer assignment #472

Closed LocNguyen1994 closed 6 years ago

LocNguyen1994 commented 6 years ago

curl localhost:1901 shows content in terminal

curl localhost:1901 –verbose Server information > sends request to server < response from the server

curl localhost:1901 --verbose --request OPTIONS Door deze lijn krijg je alleen de server informatie te zien met daarbij de http versie en de status 200 wat staat voor verbonden en ok, oftewel of de data is toegestaan

curl localhost:1901 --verbose --request DELETE Hierbij kregen we een eror omdat deleten niet toegestaan word, zoals je kan zien krijg je ook een error message en een error code 405 METHOD OT ALLOWED

curl localhost:1901 --verbose --request HEAD Head is hetzelfde als get maar zonder de body

curl localhost:1901 --verbose --request POST Door POST voegen we iets toe aan de browser

curl localhost:1901 --verbose --request POST --data '{"titel":"wonder-woman"}' Een post request met dat titel wonder-woman verstuurt Na het toevoegen van de titel kan je naar je localhost gaan om te kijken wat er veranderd is

curl localhost:1901 --header 'Accept: application/xml' Accept headers met application/xml

wooorm commented 6 years ago

Nice, but could you post the cheat sheet here, in markdown?

wooorm commented 6 years ago

@LocNguyen1994 Ping!

LocNguyen1994 commented 6 years ago

Yes dat ga ik nu doen

wooorm commented 6 years ago

Pinggg!