Prev |  | Next

## 18.2. Streaming

The whole REST API can be transmitted as JSON streams, resulting in better performance and lower memory overhead on the server side. To use it, adjust the request headers for every call, see the example below for details.

| Caution
This feature is new, and you should make yourself comfortable with the streamed response style versus the non-streamed API where results are delivered in a single large response. Expect future releases to have streaming enabled by default since it is a far more efficient mechanism for both client and server.

Figure 18.2. Final Graph

Example request

- `GET` `http://localhost:7474/db/data/`
- `Accept:` `application/json`
- `X-Stream:` `true`

Example response

- `200:` `OK`
- `Content-Type:` `application/json; stream=true`

    {
      "extensions" : {
      },
      "node" : "http://localhost:7474/db/data/node",
      "reference_node" : "http://localhost:7474/db/data/node/203",
      "node_index" : "http://localhost:7474/db/data/index/node",
      "relationship_index" : "http://localhost:7474/db/data/index/relationship",
      "extensions_info" : "http://localhost:7474/db/data/ext",
      "relationship_types" : "http://localhost:7474/db/data/relationship/types",
      "batch" : "http://localhost:7474/db/data/batch",
      "cypher" : "http://localhost:7474/db/data/cypher",
      "neo4j_version" : "1.8.2"
    }

Copyright © 2013 Neo Technology

Prev | Up | Next
| Home |