SNP HTTP V0 - fullphat/snarl_network_protocol GitHub Wiki

v0

This is the original version of SNP/HTTP that was included with Snarl 2.1.  It is a very easy to use protocol and is ideally suited to smaller applications, especially those which only need to create occasional notifications.

v0 is now considered deprecated - being replaced in Snarl 5.0 with SNP/HTTP v1 - and we encourage anyone using v0 to at least move to v1.

Request Format

All v0 requests must use the HTTP GET method.  A v0 request is formatted as follows:

/<command>[?args]

Note that the <command>[?args] query format is identical to the standard Snarl Hydride API query.

As of Snarl 5.0, the SNP/HTTP V0 implementation returns a human-readable welcome page in response to an empty (that is, '/') request.

Response Format

All SNP/HTTP v0 responses follow the same pattern:

SNP/<version>/<result_code>/<result_text>[/<extra_data>]

Examples:

A successful notify request could return:

SNP/2.1/0/OK/999

This indicates the command was successful and returned token number 999.

A failed request could return:

SNP/2.1/102/UnknownCommand

⚠️ **GitHub.com Fallback** ⚠️