---
title: "mock connection · RUAL Documentation"
description: "Creates a dummy HTTP connecton with a callback to catch the reply."
canonical: https://docs.rual.nl/block-types/http/function_connection_mocking
language: en
---

# mock connection

This block is part of the [`http`](https://docs.rual.nl/block-types/http) group and was last modified in core [`v12.0.7`](https://docs.rual.nl/core-versions/120007).

Creates a dummy HTTP connecton with a callback to catch the reply.

- flow `flow`

- url required `value` The URI this API acts for.

- method `value` The method for this API request, defaults to `GET`.

- body `object` In case of a `POST`, `PUT` or `DELETE` a body can be given.

- query `object` Query part added to the URI.

- Reply required `inpinfunction`

- flow `flow`

- httpconnection `httpconnection`

A typical wiring for [mock connection](https://docs.rual.nl/block-types/http/function_connection_mocking): a [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) starts the flow; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `url` pin; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%20ui/state_debug).

![Studio canvas example for the mock connection block: typical wiring for mock connection.](https://docs.rual.nl/canvas-examples/function_connection_mocking.png)

### Version history

Introduced in [`v12.0.7`](https://docs.rual.nl/core-versions/120007).
