mirror of https://gitee.com/bigwinds/arangodb
144 lines
3.0 KiB
Plaintext
144 lines
3.0 KiB
Plaintext
shell> curl --dump - http://localhost:8529/hello/world
|
|
|
|
HTTP/1.1 200 OK
|
|
content-type: application/json; charset=utf-8
|
|
|
|
{
|
|
"request" : {
|
|
"user" : null,
|
|
"database" : "_system",
|
|
"url" : "/hello/world",
|
|
"protocol" : "http",
|
|
"server" : {
|
|
"address" : "127.0.0.1",
|
|
"port" : 35246
|
|
},
|
|
"client" : {
|
|
"address" : "127.0.0.1",
|
|
"port" : 7051,
|
|
"id" : "11"
|
|
},
|
|
"internals" : {
|
|
},
|
|
"headers" : {
|
|
"accept-encoding" : "deflate",
|
|
"authorization" : "Basic cm9vdDo=",
|
|
"connection" : "Keep-Alive",
|
|
"content-length" : "0",
|
|
"host" : "127.0.0.1",
|
|
"user-agent" : "ArangoDB"
|
|
},
|
|
"requestType" : "GET",
|
|
"parameters" : {
|
|
},
|
|
"cookies" : {
|
|
},
|
|
"compatibility" : 20700,
|
|
"urlParameters" : {
|
|
}
|
|
},
|
|
"options" : {
|
|
}
|
|
}
|
|
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/hello/world <<EOF
|
|
{hello: 'world'}
|
|
EOF
|
|
|
|
HTTP/1.1 200 OK
|
|
content-type: application/json; charset=utf-8
|
|
|
|
{
|
|
"request" : {
|
|
"user" : null,
|
|
"database" : "_system",
|
|
"url" : "/hello/world",
|
|
"protocol" : "http",
|
|
"server" : {
|
|
"address" : "127.0.0.1",
|
|
"port" : 35246
|
|
},
|
|
"client" : {
|
|
"address" : "127.0.0.1",
|
|
"port" : 7051,
|
|
"id" : "11"
|
|
},
|
|
"internals" : {
|
|
},
|
|
"headers" : {
|
|
"accept-encoding" : "deflate",
|
|
"authorization" : "Basic cm9vdDo=",
|
|
"connection" : "Keep-Alive",
|
|
"content-length" : "16",
|
|
"host" : "127.0.0.1",
|
|
"user-agent" : "ArangoDB"
|
|
},
|
|
"requestType" : "POST",
|
|
"requestBody" : "{hello: 'world'}",
|
|
"parameters" : {
|
|
},
|
|
"cookies" : {
|
|
},
|
|
"compatibility" : 20700,
|
|
"urlParameters" : {
|
|
}
|
|
},
|
|
"options" : {
|
|
}
|
|
}
|
|
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/hello/world <<EOF
|
|
{hello: 'world'}
|
|
EOF
|
|
|
|
HTTP/1.1 200 OK
|
|
content-type: application/json; charset=utf-8
|
|
|
|
{
|
|
"request" : {
|
|
"user" : null,
|
|
"database" : "_system",
|
|
"url" : "/hello/world",
|
|
"protocol" : "http",
|
|
"server" : {
|
|
"address" : "127.0.0.1",
|
|
"port" : 35246
|
|
},
|
|
"client" : {
|
|
"address" : "127.0.0.1",
|
|
"port" : 7051,
|
|
"id" : "11"
|
|
},
|
|
"internals" : {
|
|
},
|
|
"headers" : {
|
|
"accept-encoding" : "deflate",
|
|
"authorization" : "Basic cm9vdDo=",
|
|
"connection" : "Keep-Alive",
|
|
"content-length" : "16",
|
|
"host" : "127.0.0.1",
|
|
"user-agent" : "ArangoDB"
|
|
},
|
|
"requestType" : "PUT",
|
|
"requestBody" : "{hello: 'world'}",
|
|
"parameters" : {
|
|
},
|
|
"cookies" : {
|
|
},
|
|
"compatibility" : 20700,
|
|
"urlParameters" : {
|
|
}
|
|
},
|
|
"options" : {
|
|
}
|
|
}
|
|
shell> curl -X DELETE --dump - http://localhost:8529/hello/world
|
|
|
|
HTTP/1.1 404 Not Found
|
|
content-type: application/json; charset=utf-8
|
|
|
|
{
|
|
"error" : true,
|
|
"code" : 404,
|
|
"errorNum" : 404,
|
|
"errorMessage" : "unknown path '/hello/world'"
|
|
}
|