https://github.com/EventStore/EventStore/blob/release-v3.6.0/src/EventStore.Core/Services/Transport/Http/Convert.cs#L268
=body should include metadata
Here is a test showing it...
greg@clown:~/Downloads$ cat myevent.txt
[
{
"eventId": "fbf4a1a1-b4a3-4dfe-a01f-ec52c34e16e4",
"eventType": "event-type",
"metadata" : {"test" : "metadata" },
"data": { "a": "1" }
}
]
greg@clown:~/Downloads$ curl -i [email protected]
"http://127.0.0.1:2113/streams/newstream" -H
"Content-Type:application/vnd.eventstore.events+json"
HTTP/1.1 201 Created
Access-Control-Allow-Methods: POST, DELETE, GET, OPTIONS
Access-Control-Allow-Headers: Content-Type, X-Requested-With,
X-Forwarded-Host, X-PINGOTHER, Authorization, ES-LongPoll,
ES-ExpectedVersion, ES-EventId, ES-EventType, ES-RequiresMaster,
ES-HardDelete, ES-ResolveLinkTo, ES-ExpectedVersion
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Location, ES-Position
Location: http://127.0.0.1:2113/streams/newstream/0
Content-Type: text/plain; charset=utf-8
Server: Mono-HTTPAPI/1.0
Content-Length: 0
Keep-Alive: timeout=15,max=100
greg@clown:~/Downloads$ curl -i
http://127.0.0.1:2113/streams/newstream?embed=body -H "Accept:
application/json"
HTTP/1.1 200 OK
Access-Control-Allow-Methods: POST, DELETE, GET, OPTIONS
Access-Control-Allow-Headers: Content-Type, X-Requested-With,
X-Forwarded-Host, X-PINGOTHER, Authorization, ES-LongPoll,
ES-ExpectedVersion, ES-EventId, ES-EventType, ES-RequiresMaster,
ES-HardDelete, ES-ResolveLinkTo, ES-ExpectedVersion
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Location, ES-Position
Cache-Control: max-age=0, no-cache, must-revalidate
Vary: Accept
ETag: "0;1391431453"
Content-Type: application/json; charset=utf-8
Server: Mono-HTTPAPI/1.0
Content-Length: 1647
Keep-Alive: timeout=15,max=100
{
"title": "Event stream 'newstream'",
"id": "http://127.0.0.1:2113/streams/newstream",
"updated": "2016-03-03T19:08:35.416529Z",
"streamId": "newstream",
"author": {
"name": "EventStore"
},
"headOfStream": true,
"selfUrl": "http://127.0.0.1:2113/streams/newstream",
"eTag": "0;-2060438500",
"links": [
{
"uri": "http://127.0.0.1:2113/streams/newstream",
"relation": "self"
},
{
"uri": "http://127.0.0.1:2113/streams/newstream/head/backward/20",
"relation": "first"
},
{
"uri": "http://127.0.0.1:2113/streams/newstream/1/forward/20",
"relation": "previous"
},
{
"uri": "http://127.0.0.1:2113/streams/newstream/metadata",
"relation": "metadata"
}
],
"entries": [
{
"eventId": "fbf4a1a1-b4a3-4dfe-a01f-ec52c34e16e4",
"eventType": "event-type",
"eventNumber": 0,
"data": "{\n \"a\": \"1\"\n}",
"metaData": "{\n \"test\": \"metadata\"\n}",
"streamId": "newstream",
"isJson": true,
"isMetaData": true,
"isLinkMetaData": false,
"positionEventNumber": 0,
"positionStreamId": "newstream",
"title": "0@newstream",
"id": "http://127.0.0.1:2113/streams/newstream/0",
"updated": "2016-03-03T19:08:35.416529Z",
"author": {
"name": "EventStore"
},
"summary": "event-type",
"links": [
{
"uri": "http://127.0.0.1:2113/streams/newstream/0",
"relation": "edit"
},
{
"uri": "http://127.0.0.1:2113/streams/newstream/0",
"relation": "alternate"
}
]
}
]
}