Skip to content

Request Blocking ​

Use Request Blocking to configure a URL and choose either Block Request or Block Response.

Block Request vs. Block Response ​

Block Request: The request never reaches the server.

Client → HttpShark → (intercepted) → Server is not reached

Use it to simulate a network failure, unavailable API, server rejection, or blocked analytics reporting.

Block Response: The request is sent, but its response is intercepted. The client receives a locally generated response.

Client → HttpShark → Server (request received)
Server → HttpShark (response intercepted) → Client receives a locally generated response

Use it to simulate a server error response or test how the frontend handles an abnormal response without affecting server logs, because the request still reaches the server.

Steps ​

  1. Open Blocking Settings.
  2. Add the URL to block, then choose Block Request or Block Response.
  3. Return to the capture list and verify that the rule works.

HttpShark · HarmonyOS Network Inspector