- What’s the difference between
PUTandPATCH?- Both are used to update data on the server
PUTupdates the whole resource. Can create resources, similar to howPOSTworks, but can only do so if there is a defined URIPATCHonly updates part of the resource. Cannot create resources
- Provide links to 3 services or tools that allow you to “mock” an API for development like
json-server - Compare and contrast Swagger and APIDoc.js 1 Which HTTP status codes should be sent with each type of (un)successful API call?
- both are API documentation tools
- Swagger - used for implementing OpenAPI specification
- APIDoc.js - "creates a documentation from API annotations in your source code" - apidocjs.com
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 407 Proxy Authentication Required
- 408 Request Timeout
- 409 Conflict
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 413 Payload Too Large
- 414 Request-URI Too Long
- 415 Unsupported Media Type
- 416 Requested Range Not Satisfiable
- 417 Expectation Failed
- 418 I'm a teapot
- 421 Misdirected Request
- 422 Unprocessable Entity
- 423 Locked
- 424 Failed Dependency
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 444 Connection Closed Without Response
- 451 Unavailable For Legal Reasons
- 499 Client Closed Request
- 500 Internal Server Error
- 501 Not Implemented
- 502 Bad Gateway
- 503 Service Unavailable
- 504 Gateway Timeout
- 505 HTTP Version Not Supported
- 506 Variant Also Negotiates
- 507 Insufficient Storage
- 508 Loop Detected
- 510 Not Extended
- 511 Network Authentication Required
- 599 Network Connect Timeout Error
source:httpstatuses.com
- Compare and contrast SOAP and ReST
- Both used to define how APIs should be built
- SOAP - Simple Object Access Protocol
- protocol so it has built-in rules
- makes it more rigid
- REST - Representational State Transfer
- more recent
- architectural principles vs protocol
- used for lightweight web services and mobile apps
- more flexible - allows implementation of its recommendations up to developers
source: https://www.redhat.com/en/topics/integration/whats-the-difference-between-soap-rest
Web Server - software that accepts HTTP requests Express - a framework that provides access to server methods and properties. A server that is created with Express is an HTTP server. Routing - creating a path for network traffic between servers and clients WRRC - Web Request Response Cycle
- Which 3 things had you heard about previously and now have better clarity on?
- Express, Web servers, Routing
- Which 3 things are you hoping to learn more about in the upcoming lecture/demo?
- WRRC, PUT, PATCH
- What are you most excited about trying to implement or see how it works?
- PUT and PATCH methods, API mocking