Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
82 lines (70 sloc) 3.48 KB
<class name = "xrap_msg"
signature = "5"
title = "XRAP serialization over ZMTP"
script = "zproto_codec_c"
package_dir = "."
>
This is the XRAP protocol (http://rfc.zeromq.org/spec:40/XRAP):
<message name = "POST" id = "1">
<field name = "parent" type = "string">Schema/type/name</field>
<field name = "content type" type = "string">Content type</field>
<field name = "content body" type = "longstr">New resource specification</field>
Create a new, dynamically named resource in some parent.
</message>
<message name = "POST OK" id = "2">
<field name = "status code" type = "number" size = "2">Response status code 2xx</field>
<field name = "location" type = "string">Schema/type/name</field>
<field name = "etag" type = "string">Opaque hash tag</field>
<field name = "date modified" type = "number" size = "8">Date and time modified</field>
<field name = "content type" type = "string">Content type</field>
<field name = "content body" type = "longstr">Resource contents</field>
Success response for POST.
</message>
<message name = "GET" id = "3">
<field name = "resource" type = "string">Schema/type/name</field>
<field name = "if modified since" type = "number" size="8">GET if more recent</field>
<field name = "if none match" type = "string">GET if changed</field>
<field name = "content type" type = "string">Desired content type</field>
Retrieve a known resource.
</message>
<message name = "GET OK" id = "4">
<field name = "status code" type = "number" size = "2">Response status code 2xx</field>
<field name = "content type" type = "string">Actual content type</field>
<field name = "content body" type = "longstr">Resource specification</field>
Success response for GET.
</message>
<message name = "GET EMPTY" id = "5">
<field name = "status code" type = "number" size = "2">Response status code 3xx</field>
Conditional GET returned 304 Not Modified.
</message>
<message name = "PUT" id = "6">
<field name = "resource" type = "string">Schema/type/name</field>
<field name = "if unmodified since" type = "number" size="8">Update if same date</field>
<field name = "if match" type = "string">Update if same ETag</field>
<field name = "content type" type = "string">Content type</field>
<field name = "content body" type = "longstr">New resource specification</field>
Update a known resource.
</message>
<message name = "PUT OK" id = "7">
<field name = "status code" type = "number" size = "2">Response status code 2xx</field>
<field name = "location" type = "string">Schema/type/name</field>
<field name = "etag" type = "string">Opaque hash tag</field>
<field name = "date modified" type = "number" size = "8">Date and time modified</field>
Success response for PUT.
</message>
<message name = "DELETE" id = "8">
<field name = "resource" type = "string">schema/type/name</field>
<field name = "if unmodified since" type = "number" size="8">DELETE if same date</field>
<field name = "if match" type = "string">DELETE if same ETag</field>
Remove a known resource.
</message>
<message name = "DELETE OK" id = "9">
<field name = "status code" type = "number" size = "2">Response status code 2xx</field>
Success response for DELETE.
</message>
<message name = "ERROR" id = "10">
<field name = "status code" type = "number" size = "2">Response status code, 4xx or 5xx</field>
<field name = "status text" type = "string">Response status text</field>
Error response for any request.
</message>
</class>