Blog 308

Jayswilder
2 min readOct 26, 2020

Stuff

  1. Can you explain the purpose of each type of HTTP Request when using a RESTful web service?
    The purpose of each of the HTTP request types, when used with a RESTful web service, is as follows. Retrieves data from the server (should only retrieve data and should have no other effect). This is also called an idempotent method. here is an example of a GET request to retrieve the book with id 123 from Server.
  2. What’s a test pyramid? How can you implement it when talking about HTTP APIs?
    The “Test Pyramid” is a metaphor that tells us to group software tests into buckets of different granularity. It also gives an idea of how many tests we should have in each of these groups. Validate the keys with the Min. and Max range of APIs (e.g maximum and minimum length) Keys verification. If we have JSON, XML APIs we should verify it’s that all the keys are coming. Have a test case to do XML, JSON Schema validation. Verify the Parse the Response data Verify the JSON Schema validation, Verify the Field Type,Verify the Mandatory Fields
  3. What is the “demultiplexer”?
    A demultiplexer (or demux) is a device that takes a single input line and routes it to one of several digital output lines.
  4. What’s the difference between “blocking” and ‘non-blocking’ functions?
    Blocking and Non Blocking Function Calls: Blocking and synchronous mean the same thing: you call the API, it hangs up the thread until it has some kind of answer and returns it to you. Non-blocking means that if an answer can’t be returned rapidly, the API returns immediately with an error and does nothing else.
  5. What are the main security implementations within NodeJS?
    A certified security module can vet any third party codes that are fed into the software. It acts as a filter that scans all the available libraries in the Node. J network and the automatically identify whether the third party codes are available or not. Certification helps to scan for any possible hacking.
  6. Explain the “path” module in NodeJS.
    Node. js path module is used for handling and transforming file paths. This module can be imported using the following syntax. var path = require(“path”)

--

--