# Example 2 - Node Responds (HTTP)

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

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

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

{% code title="flowsync-example-2-node-responds-http.yaml" 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 %}
