createHttpInterceptor
Creates an HTTP interceptor. All requests and responses are typed by default with a schema, including methods, paths, status codes, arguments, and bodies.
HttpInterceptor
HTTP interceptors provide the main API to handle HTTP requests and return mock responses. The methods, paths, status codes, parameters, and responses are statically typed based on the service schema.
HttpRequestHandler
An HTTP request handler to declare responses for intercepted requests. When multiple handlers of the same interceptor match the same method and path, the last handler created with interceptor.(path) will be used.
createInterceptorServer
Creates an interceptor server for development or testing. This function is an alternative to the zimic-interceptor server CLI command and can be used to programmatically manage an interceptor server in your code. We recommend using the CLI command for most use cases, but createInterceptorServer is useful for more advanced scenarios.
InterceptorServer
An interceptor server can be used to handle requests and return mock responses in combination with remote interceptors, which declare the responses the server should return for a given request. Interceptor servers and remote interceptors communicate with remote-procedure calls (RPC) over WebSocket.