nerdexam
Cisco

350-901 · Question #38

Which two statements describe the traits of an asynchronous API call? (Choose two.)

The correct answer is B. A call to an API does not block the code, but rather it allows application processing to continue E. A callback function typically is used to process the response from an API call. Asynchronous API calls are non-blocking and use callback functions to handle responses, allowing the application to continue executing while waiting.

Understanding and Using APIs

Question

Which two statements describe the traits of an asynchronous API call? (Choose two.)

Exhibit

350-901 question #38 exhibit

Options

  • AThe order in which API calls return can be guaranteed
  • BA call to an API does not block the code, but rather it allows application processing to continue
  • CThe end user can experience latency or performance lag while waiting for the API call to return
  • DCode execution blocks or waits for the call to an API to return.
  • EA callback function typically is used to process the response from an API call

How the community answered

(38 responses)
  • A
    5% (2)
  • B
    89% (34)
  • C
    3% (1)
  • D
    3% (1)

Why each option

Asynchronous API calls are non-blocking and use callback functions to handle responses, allowing the application to continue executing while waiting.

AThe order in which API calls return can be guaranteed

Asynchronous calls do not guarantee return order - responses may arrive in any sequence depending on network latency and server processing time.

BA call to an API does not block the code, but rather it allows application processing to continueCorrect

An asynchronous API call returns control to the caller immediately without blocking execution, allowing the rest of the application to continue processing while the API request is in flight.

CThe end user can experience latency or performance lag while waiting for the API call to return

Latency while waiting for a response is a characteristic of synchronous calls, where the thread is blocked until the response is received.

DCode execution blocks or waits for the call to an API to return.

Blocking or waiting for a call to return is the defining trait of synchronous API calls, the opposite of asynchronous behavior.

EA callback function typically is used to process the response from an API callCorrect

Because the calling code does not wait for the response, a callback function (or equivalent mechanism such as a Promise handler) is registered in advance and invoked by the runtime when the API response arrives.

Concept tested: Asynchronous vs synchronous API call behavior

Source: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Introducing

Topics

#Asynchronous API#Non-blocking#Callbacks#API communication patterns

Community Discussion

No community discussion yet for this question.

Full 350-901 Practice