cmda-bt / be-course-17-18

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

Transfer assignment #513

Closed ReiniervanLimpt closed 6 years ago

ReiniervanLimpt commented 6 years ago

curl is a command line app that can send http requests.

Requests Purpose
OPTIONS requests data about the specified path
HEAD Requests data about the head?
POST adds something to an existing file
PUT places a file whether it exists or not
PATCH edits a part of an existing file
DELETE te request the deletion of a file

Status codes

additional notes per step

  1. ...
  2. ...
  3. HEAD request starts with a request line: first comes GET followed by the path /, the protocol HTTP and finally the version 2.1
  4. user agent: tells the server about the person requesting contact. Accept: tells the server what the user wants, with / the user wants everything.
  5. ...
  6. ...
  7. the 400 error shows up because the server expected a new movie in json format.
  8. the command is fine but the serever needs a title to create a movie.
  9. the 201 code shows up when youve succesfully added something.
  10. HEAD can check if a file exists.
  11. ...
  12. with the patch request you edit some data of a file but not all of it.
  13. ...
  14. ...
  15. the 410 code tells you there used to be a file but its now gone.
  16. XML is harder to comprehend than JSON. you can ask the API to send you different kinds of files.
  17. Accept-encoding: reads encoded files which arent ledgible by humans.
  18. the 401 error tells you you are not allowed to perform the requested command.
rijkvanzanten commented 6 years ago

Good job 😄