Trishul API MCQs with answers Page - 15

Here, you will find a collection of MCQ questions on Trishul API . Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833K Points
Coach

Q. Which method can modify request headers?

  • (A) handle_response()
  • (B) handle_request()
  • (C) Both
  • (D) None

A

Admin • 833K Points
Coach

Q. Which method can modify response headers?

  • (A) handle_request()
  • (B) handle_response()
  • (C) Both
  • (D) None

A

Admin • 833K Points
Coach

Q. Should middleware terminate execution?

  • (A) Always
  • (B) Never
  • (C) Only when necessary (e.g., security)
  • (D) Only for logging

A

Admin • 833K Points
Coach

Q. Which use case is NOT suitable for middleware?

  • (A) Authentication
  • (B) Logging
  • (C) UI rendering
  • (D) CORS handling

A

Admin • 833K Points
Coach

Q. What can middleware modify?

  • (A) Only request
  • (B) Only response
  • (C) Both request and response
  • (D) Database schema

A

Admin • 833K Points
Coach

Q. Which class is used in handle_request() parameter?

  • (A) Response
  • (B) Request
  • (C) Router
  • (D) DB

A

Admin • 833K Points
Coach

Q. Which class is used in handle_response() parameter?

  • (A) Request
  • (B) Router
  • (C) Response
  • (D) Model

A

Admin • 833K Points
Coach

Q. What is a key rule when implementing middleware?

  • (A) Always return null
  • (B) Always return Request/Response object
  • (C) Always throw exception
  • (D) Always log data

A

Admin • 833K Points
Coach

Q. Which scenario may justify stopping execution in middleware?

  • (A) Logging info
  • (B) Authentication failure
  • (C) Adding headers
  • (D) Formatting response

A

Admin • 833K Points
Coach

Q. What is the primary purpose of LoggerFactory?

  • (A) Handle database connections
  • (B) Provide logging mechanism
  • (C) Manage routing
  • (D) Handle middleware

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ