# Example 2 - Node Responds (HTTP)

Building upon [Example 1 - Node with Transaction Mode (HTTP)](https://docs.cybus.io/1-10-2/documentation/services/flowsync/flowsync-example-1), 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](https://docs.cybus.io/1-10-2/documentation/service-commissioning-files/resources/cybus-node#operation).

<figure><img src="https://602582052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq3p17lWu5YRliiaKj1Yr%2Fuploads%2Fgit-blob-0ca52154dbcca1fe70de36fca83643c3a36db8d3%2Fflowsync-example-2.png?alt=media" alt=""><figcaption></figcaption></figure>

{% file src="<https://602582052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq3p17lWu5YRliiaKj1Yr%2Fuploads%2Fgit-blob-f82df3ca54ab117e7c847bbce380179e31f0c830%2Fflowsync-example-2-node-responds-http.yaml?alt=media>" %}

{% 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 %}
