1- What’s the difference between PUT and PATCH?
The main difference between the PUT and PATCH method is that the PUT method use the request URI to supply a modified version of the requested resource which replaces the original version of the resource, where’s the PATCH method supplies a set of instructions to modify the resource.
2.Provide links to 3 services or tools that allow you to “mock” an API for development like json-server
3. Compare and contrast Swagger and APIDoc.js 1 Which HTTP status codes should be sent with each type of (un)successful API call?
-
apiDocjs: Inline Documentation for RESTful web APIs, It creates a documentation from API annotations in your source code. It includes a default template which uses handlebars, Bootstrap, RequireJS and jQuery for the output of the generated apidata.js and apiproject.js as a html-page
-
Swagger: It is a free cloud-based API testing and documentation tool to simplify the validation of any API and generate its corresponding OpenAPI documentation.
-
HTTP Status Codes
responses: 200: description: OK 400: description: Bad request. User ID must be an integer and bigger than 0. 401: description: Authorization information is missing or invalid. 404: description: A user with the specified ID was not found.
4. Compare and contrast SOAP and ReST
-
SOAP stands for Simple Object Access Protocol whereas REST stands for Representational State Transfer.
-
SOAP is a protocol whereas REST is an architectural pattern.
-
SOAP uses service interfaces to expose its functionality to client applications while REST uses Uniform Service locators to access to the components on the hardware device.
-
SOAP needs more bandwidth for its usage whereas REST doesn’t need much bandwidth.
-
Comparing SOAP vs REST API, SOAP only works with XML formats whereas REST work with plain text, XML, HTML and JSON.
-
SOAP cannot make use of REST whereas REST can make use of SOAP.
- Web Server
A web server is the technology that serves up a website to users when they visit a URL. On the technical side of things, what that means is that it handles the hypertext transfer protocol (HTTP)
- Express
Web Applications Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
- Routing
Routing is responsible for matching incoming HTTP requests and dispatching those requests to the app’s executable endpoints. Endpoints are the app’s units of executable request-handling code. Endpoints are defined in the app and configured when the app starts. The endpoint matching process can extract values from the request’s URL and provide those values for request processing. Using endpoint information from the app, routing is also able to generate URLs that map to endpoint