Command line toolsCurl

Curl

cn curl prepares and executes a CURL command line for a HTTP store request. This is helpful for debugging a HTTP store implementation. Outside of low-level debugging, it is more convenient to use the "cn get|put|list|add|remove …" commands, which are richer in functionality, and work on all stores.

cn curl get OBJECT
cn curl get HASH [from|on STORE]

Downloads an object with a GET request on an object store.

cn curl put FILE [onto STORE]

Uploads an object with a PUT request on an object store.

cn curl book OBJECT
cn curl book HASH [on STORE]

Books an object with a POST request on an object store.

cn curl list message box of ACTOR [on STORE]
cn curl list private box of ACTOR [on STORE]
cn curl list public box of ACTOR [on STORE]

Lists the indicated box with a GET request on an account store.

cn curl watch message box of ACTOR [on STORE]
cn curl watch private box of ACTOR [on STORE]
cn curl watch public box of ACTOR [on STORE]

As above, but with a watch timeout of 60 second.

cn curl add (FILE|HASH)* to (message|private|public) box of ACTOR [and …] [on STORE]
cn curl remove HASH* from (message|private|public) box of ACTOR [and …] [on STORE]

Modifies the indicated boxes with a POST request on an account store. Multiple modifications to different boxes may be chained using "and". All modifications are submitted using a single request, which is optionally signed (see below).

… using KEYPAIR

Signs the request using KEYPAIR instead of the actor's key pair. The store may or may not verify the signature.

For debugging purposes, information about the signature is stored as ".cn-curl-bytes-to-sign", ".cn-curl-hash-to-sign", and ".cn-curl-signature" in the current folder. Note that signatures are valid for 1-2 minutes only. After that, servers will reject them to guard against replay attacks.

Syntax

Open