# Example 2 - Node Responds (HTTP)

Building upon [Example 1 - Node with Transaction Mode (HTTP)](/1-10-0/documentation/services/flowsync/flowsync-example-1.md), this configuration demonstrates how to set up a complete request-response cycle using FlowSync. The service includes a mapping that processes incoming HTTP requests and generates defined responses. When a request arrives, the system automatically creates and publishes an appropriate response message, preventing the timeout scenario seen in the previous example.

* To call the HttpNode in the example below, run the following command:

{% code lineNumbers="true" %}

```yaml
curl --insecure \
--location 'https://127.0.0.1/data/flowsync/example2' \
--header 'Authorization: Bearer <replace with your token>'
```

{% endcode %}

For more information on the FlowSync configuration properties, see [Cybus:Node](/1-10-0/documentation/services/service-commissioning-files/structure-of-service-commissioning-files/resources/cybus-node.md#operation).

<figure><img src="/files/c97bGwAqBXTxBRunNEYT" alt=""><figcaption></figcaption></figure>

{% file src="/files/WwVUhbnktgV1Efued6GO" %}

{% code lineNumbers="true" %}

```yaml
description: FlowSync - Example 2

metadata:
    name: example 2
    version: 1.0.0

resources:
    testServer:
        type: Cybus::Server::Http
        properties:
            basePath: /FlowSync

    exampleNode:
        type: Cybus::Node::Http
        properties:
            parent: !ref testServer
            method: GET
            route: /example2
            operation: transaction

    exampleMappings:
        type: Cybus::Mapping
        properties:
            mappings:
                - subscribe:
                      endpoint: !ref exampleNode
                  publish:
                      endpoint: !ref exampleNode
                  rules:
                      - transform:
                            expression: >-
                                (
                                  {
                                    "id": $.id,
                                    "timestamp": $.timestamp,
                                    "value": {
                                      "response" : "This is a response to your HTTP GET request."}
                                  }
                                )
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cybus.io/1-10-0/documentation/services/flowsync/flowsync-example-2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
